上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 79 下一页
摘要: https://leetcode.com/problems/bitwise-and-of-numbers-range/[n,m]区间的合取总值就是n,m对齐后前面一段相同的数位的值比如5:1017:111结果就是4:100class Solution {public: int rangeBit... 阅读全文
posted @ 2015-08-27 19:27 雪溯 阅读(173) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/longest-substring-without-repeating-characters/思路:从某点结束所能取到的最早开头是到目前出现倒数第二次的字符的最末位置后一位如图:(S代表起点,T代表终点)abcabcab**S*T假设现在在... 阅读全文
posted @ 2015-08-27 11:37 雪溯 阅读(156) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/add-two-numbers/You are given two linked lists representing two non-negative numbers. The digits are stored in reverse o... 阅读全文
posted @ 2015-08-27 10:45 雪溯 阅读(149) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/nth-highest-salary/ATTENTION:limit 子句只能接受int常量,不能接受运算式CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INTBEGINSET N =... 阅读全文
posted @ 2015-08-26 15:42 雪溯 阅读(214) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/second-highest-salary/Write a SQL query to get the second highest salary from theEmployeetable.+----+--------+| Id | Sal... 阅读全文
posted @ 2015-08-26 07:58 雪溯 阅读(150) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/combine-two-tables/Combine Two TablesTable: Person+-------------+---------+| Column Name | Type |+-------------+-----... 阅读全文
posted @ 2015-08-26 07:53 雪溯 阅读(332) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/two-sum/class Solution {public: vector twoSum(vector& nums, int target) { vector index(2,0); vector n2;... 阅读全文
posted @ 2015-08-25 18:12 雪溯 阅读(132) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/length-of-last-word/int lengthOfLastWord(char* s) { int ans = 0; int fans = 0; for(int i = 0;s[i];i++){ ... 阅读全文
posted @ 2015-08-25 16:48 雪溯 阅读(97) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/excel-sheet-column-number/class Solution {public: int titleToNumber(string s) { int ans = 0; for(int i ... 阅读全文
posted @ 2015-08-25 16:40 雪溯 阅读(110) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/min-stack/#include #include #include #include using namespace std;class MinStack {public: vector vec; priority_que... 阅读全文
posted @ 2015-08-25 16:25 雪溯 阅读(187) 评论(0) 推荐(0) 编辑
上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 79 下一页