- 博客(9)
- 资源 (3)
- 收藏
- 关注
原创 Leetcode 653. Two Sum IV - Input is a BST
文章作者:Tyan 博客:noahsnail.com | CSDN | 简书 1. Description 2. Solution Version 1 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *l...
2019-01-31 16:28:04 439
原创 Leetcode 167. Two Sum II - Input array is sorted
文章作者:Tyan 博客:noahsnail.com | CSDN | 简书 1. Description 2. Solution Version 1 class Solution { public: vector<int> twoSum(vector<int>& numbers, int target)...
2019-01-31 15:39:37 294
原创 Leetcode 767. Reorganize String
文章作者:Tyan 博客:noahsnail.com | CSDN | 简书 1. Description 2. Solution class Solution { public: string reorganizeString(string S) { int length = S.size(); int maximum...
2019-01-31 14:08:27 538
原创 Leetcode 740. Delete and Earn
文章作者:Tyan 博客:noahsnail.com | CSDN | 简书 1. Description 2. Solution class Solution { public: int deleteAndEarn(vector<int>& nums) { int points = 0; in...
2019-01-31 10:58:17 556
原创 Leetcode 874. Walking Robot Simulation
文章作者:Tyan 博客:noahsnail.com | CSDN | 简书 1. Description 2. Solution class Solution { public: int robotSim(vector<int>& commands, vector<vector<int>>&am...
2019-01-31 09:43:51 569
原创 Leetcode 213. House Robber II
文章作者:Tyan 博客:noahsnail.com &nbsp;|&nbsp; CSDN &nbsp;|&nbsp; 简书 1. Description 2. Solution class Solution { public: int rob(vector&lt;int&gt;&amp; nums) { int n = nums.size(); if(n == 0)
2019-01-30 14:30:05 244
原创 Leetcode 198. House Robber
文章作者:Tyan 博客:noahsnail.com &nbsp;|&nbsp; CSDN &nbsp;|&nbsp; 简书 1. Description 2. Solution class Solution { public: int rob(vector&lt;int&gt;&amp; nums) { int n = nums.size(); if(n == 0)
2019-01-30 13:41:23 288
原创 Leetcode 337. House Robber III
文章作者:Tyan 博客:noahsnail.com &nbsp;|&nbsp; CSDN &nbsp;|&nbsp; 简书 1. Description 2. Solution Version 1 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *l...
2019-01-29 16:29:47 335
原创 Leetcode 849. Maximize Distance to Closest Person
文章作者:Tyan 博客:noahsnail.com &amp;amp;nbsp;|&amp;amp;nbsp; CSDN &amp;amp;nbsp;|&amp;amp;nbsp; 简书 1. Description 2. Solution Version 1 class Solution { public: int maxDistToClosest(vector&amp;amp;lt;int&a
2019-01-07 18:30:54 456
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人