摘要: https://leetcode.com/problems/implement-stack-using-queues/#/description 阅读全文
posted @ 2017-04-24 22:39 Sempron2800+ 阅读(119) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/palindrome-linked-list/#/description 补充一个python的实现: 阅读全文
posted @ 2017-04-24 22:16 Sempron2800+ 阅读(134) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/word-pattern/#/description 阅读全文
posted @ 2017-04-24 22:03 Sempron2800+ 阅读(113) 评论(0) 推荐(0) 编辑
摘要: /** * Definition for a binary tree node. * public class TreeNode { * public int val; * public TreeNode left; * public TreeNode right; * public TreeNod 阅读全文
posted @ 2017-04-24 21:34 Sempron2800+ 阅读(122) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/perfect-number/#/description 阅读全文
posted @ 2017-04-24 20:57 Sempron2800+ 阅读(114) 评论(0) 推荐(0) 编辑
摘要: public class Solution { Stack<char> S = new Stack<char>(); public bool IsValid(string s) { foreach (var c in s) { if (c == '(' || c == '[' || c == '{' 阅读全文
posted @ 2017-04-24 20:42 Sempron2800+ 阅读(166) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/isomorphic-strings/#/description 阅读全文
posted @ 2017-04-24 19:31 Sempron2800+ 阅读(100) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/find-all-anagrams-in-a-string/#/description 上面的是别人在讨论区的实现。 下面是我自己的实现,使用非递归方法,性能更好: 阅读全文
posted @ 2017-04-24 17:54 Sempron2800+ 阅读(179) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/binary-tree-tilt/#/description 阅读全文
posted @ 2017-04-24 15:00 Sempron2800+ 阅读(104) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/array-partition-i/#/description 阅读全文
posted @ 2017-04-24 11:47 Sempron2800+ 阅读(93) 评论(0) 推荐(0) 编辑