码迷,mamicode.com
首页 >  
搜索关键字:leetcode easy    ( 39612个结果
Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3....
分类:其他好文   时间:2014-04-29 13:47:20    阅读次数:251
ExtJS中设置下拉列表不可编辑
ExtJS中设置下拉列表框不可编辑        ExtJS这个框架,并没有学习和用过,只知道是一个流行的前段框架,和Easy UI,BUI,DWZ等这些框架都是差不多的,只不过比他们更加强大而已,之所以写这个,我觉得还是很有帮助的。         今天朋友遇到了一个问题:ExtJS中的下拉列表如何设置不可编辑的,html中是不可以编辑的,但是现在这种UI框架中的下拉列表框都是可以编辑的,朋...
分类:Web程序   时间:2014-04-29 13:44:21    阅读次数:389
Restore IP Addresses -- LeetCode
原题链接: http://oj.leetcode.com/problems/restore-ip-addresses/  这道题的解法非常接近于NP问题,也是采用递归的解法。基本思路就是取出一个合法的数字,作为IP地址的一项,然后递归处理剩下的项。可以想象出一颗树,每个结点有三个可能的分支(因为范围是0-255,所以可以由一位两位或者三位组成)。并且这里树的层数不会超过四层,因为IP地址由四段组...
分类:其他好文   时间:2014-04-29 13:16:22    阅读次数:313
Leetcode:Minimum Path Sum 最小路径和
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either down or right at...
分类:其他好文   时间:2014-04-28 10:46:41    阅读次数:311
Reverse Linked List II -- LeetCode
原题链接: http://oj.leetcode.com/problems/reverse-linked-list-ii/  这道题是比较常见的链表反转操作,不过不是反转整个链表,而是从m到n的一部分。分为两个步骤,第一步是找到m结点所在位置,第二步就是进行反转直到n结点。反转的方法就是每读到一个结点,把它插入到m结点前面位置,然后m结点接到读到结点的下一个。总共只需要一次扫描,所以时间是O(n...
分类:其他好文   时间:2014-04-28 10:38:42    阅读次数:240
Subsets II -- LeetCode
原题链接: http://oj.leetcode.com/problems/subsets-ii/ 这道题跟Subsets一样是经典的NP问题--求子集。比Subsets稍微复杂一些的是这里的集合中可能出现重复元素,因此我们在求子集的时候要避免出现重复的子集。在Subsets中我们每次加进一个元素就会把原来的子集都加上这个元素,然后再加入到结果集中,但是这样重复的元素就会产生重复的子集。为了避免...
分类:其他好文   时间:2014-04-28 10:34:42    阅读次数:373
Timus 1404. Easy to Hack! 有一个密码问题
When Vito Maretti writes an important letter he encrypts it. His method is not very reliable but it’s enough to make any detective understand nothing in that letter. Sheriff doesn’t like such state ...
分类:其他好文   时间:2014-04-27 21:45:00    阅读次数:459
Letter Combinations of a Phone Number
Letter Combinations of a Phone Number, leetcode...
分类:其他好文   时间:2014-04-27 21:28:59    阅读次数:323
Regular Expression Matching
leetcode, Regular Expression Matching...
分类:其他好文   时间:2014-04-27 21:24:04    阅读次数:272
mysql常用查询:group by,左连接,子查询,having where
前几天去了两个比较牛的互联网公司面试,在sql这块都遇到问题了,哎,可惜呀,先把简单的梳理一下 成绩表 score 1、group by 使用 按某一个维度进行分组 例如: 求每个同学的总分 SELECT student,SUM(score) FROM score GROUP BY student 求每个同学的平均分 SELECT student,AVG(score) FR...
分类:数据库   时间:2014-04-27 21:17:59    阅读次数:614
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!