
leetcode
左眼皮跳跳~
这个作者很懒,什么都没留下…
展开
-
LeetCode 147 Insertion Sort List(链表插入排序)
147. Insertion Sort ListMy SubmissionsQuestionTotal Accepted: 66569 Total Submissions: 230248 Difficulty: MediumSort a linked list using insertion sort.Subscribe to see w原创 2016-03-16 09:41:06 · 329 阅读 · 0 评论 -
2017微软秋季校园招聘在线编程笔试
题目1 : Shortening Sequence时间限制:10000ms单点时限:1000ms内存限制:256MB描述There is an integer array A1, A2 ...AN. Each round you may choose two adjacent integers. If their sum is an原创 2016-10-10 22:23:56 · 827 阅读 · 0 评论 -
LeetCode Oj 67. Add Binary
67. Add Binary QuestionEditorial Solution My SubmissionsTotal Accepted: 92800Total Submissions: 327327Difficulty: EasyGiven two binary strings, return their sum (al原创 2016-07-15 16:52:59 · 451 阅读 · 0 评论 -
LeetCode Oj 203. Remove Linked List Elements
203. Remove Linked List Elements QuestionEditorial Solution My SubmissionsTotal Accepted: 71251Total Submissions: 241722Difficulty: EasyRemove all elements from a l原创 2016-07-15 16:41:34 · 270 阅读 · 0 评论 -
234. Palindrome Linked List(判断链表是不是回文的)
234. Palindrome Linked List QuestionEditorial Solution My SubmissionsTotal Accepted: 56144Total Submissions: 191356Difficulty: EasyGiven a singly linked list, deter原创 2016-07-15 16:25:25 · 376 阅读 · 0 评论 -
LeetCode Oj 290. Word Pattern
290. Word Pattern QuestionEditorial Solution My SubmissionsTotal Accepted: 43861Total Submissions: 144885Difficulty: EasyGiven a pattern and a string str, find if原创 2016-07-15 16:01:03 · 332 阅读 · 0 评论 -
求0~n里面每个数二进制1的个数,用o(n)算法
338. Counting Bits My SubmissionsQuestionEditorial SolutionTotal Accepted: 20178 Total Submissions: 36151 Difficulty: MediumGiven a non negative integer number num. For eve原创 2016-05-09 23:55:49 · 1314 阅读 · 0 评论 -
LeetCode Oj 15. 3Sum
15. 3Sum My SubmissionsQuestionEditorial SolutionTotal Accepted: 116381 Total Submissions: 617430 Difficulty: MediumGiven an array S of n integers, are there elements a,原创 2016-05-08 13:42:58 · 328 阅读 · 0 评论 -
205. Isomorphic Strings
205. Isomorphic Strings My SubmissionsQuestionEditorial SolutionTotal Accepted: 56840 Total Submissions: 190761 Difficulty: EasyGiven two strings s and t, determine if they原创 2016-05-13 23:35:07 · 417 阅读 · 0 评论 -
225. Implement Stack using Queues (用队列模拟栈)
225. Implement Stack using Queues My SubmissionsQuestionEditorial SolutionTotal Accepted: 39085 Total Submissions: 127980 Difficulty: EasyImplement the following operations原创 2016-05-13 23:01:16 · 394 阅读 · 0 评论 -
36. Valid Sudoku
36. Valid Sudoku My SubmissionsQuestionEditorial SolutionTotal Accepted: 73627 Total Submissions: 239374 Difficulty: EasyDetermine if a Sudoku is valid, according to: Sudok原创 2016-05-11 22:53:47 · 392 阅读 · 0 评论 -
102. Binary Tree Level Order Traversal (二叉树层次遍历 输出每层)
102. Binary Tree Level Order Traversal My SubmissionsQuestionEditorial SolutionTotal Accepted: 102932 Total Submissions: 313048 Difficulty: EasyGiven a binary tree, return原创 2016-05-11 21:34:49 · 395 阅读 · 0 评论 -
172. Factorial Trailing Zeroes
172. Factorial Trailing Zeroes My SubmissionsQuestionEditorial SolutionTotal Accepted: 58597 Total Submissions: 178269 Difficulty: EasyGiven an integer n, return the number原创 2016-05-11 21:17:06 · 406 阅读 · 0 评论 -
198. House Robber (dp)
198. House Robber My SubmissionsQuestionEditorial SolutionTotal Accepted: 68856 Total Submissions: 199648 Difficulty: EasyYou are a professional robber planning to rob hous原创 2016-05-11 15:29:52 · 402 阅读 · 0 评论 -
链表反转 递归写法
206. Reverse Linked List My SubmissionsQuestionEditorial SolutionTotal Accepted: 107857 Total Submissions: 271807 Difficulty: EasyReverse a singly linked list.click to sh原创 2016-05-11 08:20:56 · 641 阅读 · 0 评论 -
leetcode 5 Longest Palindromic Substring(manacher)
题目链接: https://leetcode.com/problems/longest-palindromic-substring/题意:求一个串的最大回文字串class Solution {public: string longestPalindrome(string s) { int *p=new int[2005]; int id;原创 2016-03-10 22:52:20 · 265 阅读 · 0 评论 -
二叉树重建
给出先序和后续,重建二叉树class Solution {public: struct TreeNode* reConstructBinaryTree(vector pre,vector in) { TreeNode* ans=solve(pre,0,(int)pre.size(),in,0,(int)in.size()); return ans;原创 2016-03-17 22:31:40 · 284 阅读 · 0 评论 -
Leetcode 147. Insertion Sort List(链表实现快排)
147. Insertion Sort ListTotal Accepted: 66609 Total Submissions: 230331 Difficulty: MediumSort a linked list using insertion sort.Subscribe to see which companies asked thi原创 2016-03-16 19:44:03 · 427 阅读 · 1 评论 -
Leetcode 11. Container With Most Water (two pointers)
Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of lineiis at (i,ai) and (i, 0). Find two...原创 2019-09-21 11:46:16 · 223 阅读 · 0 评论