码迷,mamicode.com
首页 >  
搜索关键字:leecode    ( 178个结果
[LeeCode]Power of Two
Given an integer, write a function to determine if it is a power of two.My initial code: 1 class Solution: 2 # @param {integer} n 3 # @return ...
分类:其他好文   时间:2015-07-19 16:24:03    阅读次数:112
[leecode 30] Substring with Concatenation of All Words
You are given a string,s, and a list of words,words, that are all of the same length. Find all starting indices of substring(s) insthat is a concatena...
分类:其他好文   时间:2015-07-09 14:26:16    阅读次数:137
Maximal Square (leeCode)
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. For example, given the following matrix: 1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0 ...
分类:其他好文   时间:2015-06-03 17:45:21    阅读次数:101
LeeCode题目总结(1)
Contain Duplicate II:Given an array of integers and an integerk, find out whether there there are two distinct indicesiandjin the array such thatnums[...
分类:其他好文   时间:2015-05-31 12:13:16    阅读次数:106
leecode之Implement strStr()
KMP算法的实现:#include #include #include int strStr(char* haystack, char* needle) { if (haystack == NULL || needle == NULL) return -1; if (nee...
分类:其他好文   时间:2015-05-29 11:41:11    阅读次数:89
LeeCode 判断两个二叉树是否相等
题目: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. C代码...
分类:其他好文   时间:2015-05-19 22:47:09    阅读次数:147
LeeCode 连接两个有序单链表
题目: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. C代码: /** * Definition for singly-linked list...
分类:其他好文   时间:2015-05-19 22:46:09    阅读次数:141
删除单链表中的一个元素
题目: Remove all elements from a linked list of integers that have value val. Example Given: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6 Return: 1 --> 2 --> 3 --> 4 --> 5 Credits: Special...
分类:其他好文   时间:2015-05-19 22:45:51    阅读次数:194
LeeCode 删除数组中某一特定值的元素,并返回新的数组长度
题目: Given an array and a value, remove all instances of that value in place and return the new length. The order of elements can be changed. It doesn't matter what you leave beyond the new len...
分类:编程语言   时间:2015-05-19 22:44:15    阅读次数:135
LeeCode 单链表逆序
题目:Reverse a singly linked list C代码: /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ struct ListNode* reverseList(struct List...
分类:其他好文   时间:2015-05-19 20:57:20    阅读次数:128
178条   上一页 1 ... 12 13 14 15 16 ... 18 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!