摘要: https://leetcode.com/problems/longest-consecutive-sequence/ Given an unsorted array of integers, find the length of the longest consecutive elements s 阅读全文
posted @ 2018-11-29 22:16 丧心病狂工科女 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 1.冒泡排序 这个写法是先把小的数字排出来然后再排出来大的数字 代码: #include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 10; int n; int num[maxn]; void BubbleSort(int 阅读全文
posted @ 2018-11-29 20:00 丧心病狂工科女 阅读(228) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/evaluate-reverse-polish-notation/ Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid opera 阅读全文
posted @ 2018-11-29 19:06 丧心病狂工科女 阅读(113) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/single-number-ii/ Given a non-empty array of integers, every element appears three times except for one, which appears e 阅读全文
posted @ 2018-11-29 18:36 丧心病狂工科女 阅读(101) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/largest-number/ Given a list of non negative integers, arrange them such that they form the largest number. Example 1: E 阅读全文
posted @ 2018-11-29 17:45 丧心病狂工科女 阅读(136) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/factorial-trailing-zeroes/ Given an integer n, return the number of trailing zeroes in n!. Example 1: Example 2: Note: Y 阅读全文
posted @ 2018-11-29 15:07 丧心病狂工科女 阅读(110) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/excel-sheet-column-number/ Given a column title as appear in an Excel sheet, return its corresponding column number. For 阅读全文
posted @ 2018-11-29 14:46 丧心病狂工科女 阅读(115) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/excel-sheet-column-title/ Given a positive integer, return its corresponding column title as appear in an Excel sheet. F 阅读全文
posted @ 2018-11-29 14:30 丧心病狂工科女 阅读(103) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/maximum-gap/ Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Re 阅读全文
posted @ 2018-11-29 13:42 丧心病狂工科女 阅读(167) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/min-stack/ Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- 阅读全文
posted @ 2018-11-29 11:26 丧心病狂工科女 阅读(113) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/compare-version-numbers/ Compare two version numbers version1 and version2.If version1 > version2 return 1; if version1  阅读全文
posted @ 2018-11-29 10:58 丧心病狂工科女 阅读(167) 评论(0) 推荐(0) 编辑