码迷,mamicode.com
首页 >  
搜索关键字:problems    ( 6275个结果
Android Studio(三)Android Studio项目结构分析
一、了解Android Studio的几种项目结构类型 Android Studio提供了几种项目结构类型 Project Package Android Project Files Problems Productions Test 二、Project External Libraries指项目所依赖的开发环境:java sdk 1.7和android sdk API 1...
分类:移动开发   时间:2015-01-07 16:58:36    阅读次数:226
[Leetcode] 9 - Palindrome Number
原题链接: https://oj.leetcode.com/problems/palindrome-number/ 非常非常简单的一道题。。。 class Solution { public: bool isPalindrome(int x) { if (x < 0) return false; int ori = x;...
分类:其他好文   时间:2015-01-07 16:57:31    阅读次数:114
[Leetcode] 7 - Reverse Integer
原题链接: https://oj.leetcode.com/problems/reverse-integer/ 做法直接看代码,无需对负数做特殊处理。但是必须考虑溢出的情况,考虑溢出的判断则将res * 10 + num % 10 class Solution { public: int reverse(int x) { int num = x; ...
分类:其他好文   时间:2015-01-07 16:49:51    阅读次数:142
[Leetcode] 5 - Longest Palindromic Substring
题目链接:https://oj.leetcode.com/problems/longest-palindromic-substring/ 这道题通常可以写出来的是2种做法。 1. 保持一个index从前往后扫,每次index的循环中,保持left和right的index向两边扫,但是有2种情况,aba和abba。left和right的扫描要扫2次 2. DP做法,2维矩阵 * 可以...
分类:其他好文   时间:2015-01-07 15:00:44    阅读次数:128
[LeetCode]114 Flatten Binary Tree to Linked List
https://oj.leetcode.com/problems/flatten-binary-tree-to-linked-list/http://blog.csdn.net/linhuanmars/article/details/23717703/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){val=x;} *} */ publicclass..
分类:其他好文   时间:2015-01-06 18:20:38    阅读次数:147
[LeetCode]118 Pascal's Triangle
https://oj.leetcode.com/problems/pascals-triangle/http://blog.csdn.net/linhuanmars/article/details/23311527publicclassSolution{ publicList<List<Integer>>generate(intnumRows){ List<List<Integer>>toReturn=newArrayList<>(); if(nu..
分类:其他好文   时间:2015-01-06 18:15:51    阅读次数:126
[LeetCode]119 Pascal's Triangle II
https://oj.leetcode.com/problems/pascals-triangle-ii/http://blog.csdn.net/linhuanmars/article/details/23311629publicclassSolution{ publicList<Integer>getRow(introwIndex) { //SolutionA: //returngetRow_OKSpace(rowIndex); //SolutionB: returngetRow_Extra..
分类:其他好文   时间:2015-01-06 18:15:30    阅读次数:117
[LeetCode]116 Populating Next Right Pointers in Each Node
https://oj.leetcode.com/problems/populating-next-right-pointers-in-each-node/http://blog.csdn.net/linhuanmars/article/details/23499383/** *Definitionforbinarytreewithnextpointer. *publicclassTreeLinkNode{ *intval; *TreeLinkNodeleft,right,next; *TreeLinkNode..
分类:其他好文   时间:2015-01-06 18:15:27    阅读次数:170
[LeetCode]117 Populating Next Right Pointers in Each Node II
https://oj.leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/http://blog.csdn.net/linhuanmars/article/details/23510601/** *Definitionforbinarytreewithnextpointer. *publicclassTreeLinkNode{ *intval; *TreeLinkNodeleft,right,next; *TreeLinkN..
分类:其他好文   时间:2015-01-06 18:14:12    阅读次数:118
[LeetCode]120 Triangle
https://oj.leetcode.com/problems/triangle/http://blog.csdn.net/linhuanmars/article/details/23230657publicclassSolution{ publicintminimumTotal(List<List<Integer>>triangle) { //SolutionA: //returnminimumTotal_MaintainSums(triangle); //SolutionB:..
分类:其他好文   时间:2015-01-06 18:12:52    阅读次数:152
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!