码迷,mamicode.com
首页 >  
搜索关键字:longest substring wi    ( 8067个结果
Palindrome Partitioning leetcode java
题目:Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.For exam....
分类:编程语言   时间:2014-08-01 10:30:01    阅读次数:218
[leetcode]Longest Palindromic Substring
Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there...
分类:其他好文   时间:2014-08-01 04:47:25    阅读次数:243
[leetcode]Longest Substring Without Repeating Characters
Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters. For example, the ...
分类:其他好文   时间:2014-07-31 23:46:00    阅读次数:256
[leetcode]Longest Common Prefix
Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.算法思路:思路:貌似木有什么捷径,逐个比较,遇到不同即断开。代码如下: 1 publi...
分类:其他好文   时间:2014-07-31 23:31:50    阅读次数:231
[leetcode]Maximum Depth of Binary Tree
Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root ...
分类:其他好文   时间:2014-07-31 23:19:10    阅读次数:259
Longest Consecutive Sequence
其实网上关于leetcode的题目的答案已经相当多了,这也是为啥我自己不把每道题目都贴出来的原因,觉得分析得没人好,代码也没别人的精简。不过,这道题目看到网上有不少做法跟实际要求的O(n)复杂度不太符合,所以特别粘贴出来,也正好记录下自己的一些想法。   说实话,在第二遍做这道题目的时候,我还是没能够把最为完善的解法想出来,能够想到的是利用hash表以序列值为key,1(只是简单做个标记)为v...
分类:其他好文   时间:2014-07-31 21:01:41    阅读次数:165
Android中设置半个屏幕大小且居中的按钮布局 (layout_weight属性)
先看如下布局 :  上图中,按钮的大小为屏幕的一半,然后居中显示在布局中央,每个人心中都有自己的答案,看看我的方法吧,布局布局xml如下 :  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/main_layout" android:layout_wi...
分类:移动开发   时间:2014-07-31 17:16:46    阅读次数:224
图片的淡入淡出效果实现
还算简单,先发个图看看效果。主文件:[java] view plaincopyimportandroid.app.Activity;importandroid.os.Bundle;importandroid.view.animation.AnimationUtils;importandroid.wi...
分类:其他好文   时间:2014-07-31 16:13:56    阅读次数:273
Maximum Depth of Binary Tree leetcode java
题目:Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthes....
分类:编程语言   时间:2014-07-31 02:41:15    阅读次数:229
[LeetCode] Longest Consecutive Sequence(DP)
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2], The longes...
分类:其他好文   时间:2014-07-31 02:19:45    阅读次数:243
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!