摘要:
/** * Definition for a binary tree node. * public class TreeNode { * public int val; * public TreeNode left; * public TreeNode right; * public TreeNod 阅读全文
摘要:
public class Solution { public string CountAndSay(int n) { //1 //11 //21 //1211 //111221 //312211 //13112221 //1113213211 if (n == 1) { return "1"; } 阅读全文
摘要:
https://leetcode.com/problems/guess-number-higher-or-lower/#/description 阅读全文
摘要:
public class Solution { public bool IsPalindrome(int x) { if (x < 0) { return false; } var str = x.ToString(); var list = new List<string>(); foreach 阅读全文
摘要:
public class Solution { public int TrailingZeroes(int n) { if (n == 0) { return 0; } else { var x = n / 5; var y = TrailingZeroes(x); return x + y; } 阅读全文
摘要:
public class Solution { public int RemoveDuplicates(int[] nums) { var len = nums.Length; if (len == 0) { return 0; } else { var pre = nums[0]; var dif 阅读全文
摘要:
https://leetcode.com/problems/linked-list-cycle/#/description 补充一个python的版本: 阅读全文
摘要:
https://leetcode.com/problems/implement-queue-using-stacks/#/description 阅读全文
摘要:
public class Solution { public IList<int> GetRow(int rowIndex) { List<List<int>> list = new List<List<int>>(); for (int i = 0; i <= rowIndex; i++) { v 阅读全文