上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 17 下一页

2014年12月18日

摘要: Balanced Binary Tree Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tr... 阅读全文
posted @ 2014-12-18 20:54 Yu's Garden 阅读(930) 评论(0) 推荐(0) 编辑
摘要: WordLadder解题报告Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only... 阅读全文
posted @ 2014-12-18 19:07 Yu's Garden 阅读(1079) 评论(2) 推荐(0) 编辑
摘要: N-Queens II (LEVEL 4 难度级别,最高级5)Follow up for N-Queens problem.Now, instead outputting board configurations, return the totalnumber of distinct solutio... 阅读全文
posted @ 2014-12-18 18:14 Yu's Garden 阅读(536) 评论(1) 推荐(0) 编辑
摘要: REF: http://blog.csdn.net/fightforyourdream/article/details/15333405题目是一道简单的小程序,像下面这样:[java] view plaincopypublic class Test1 { public static void mai... 阅读全文
posted @ 2014-12-18 17:51 Yu's Garden 阅读(654) 评论(0) 推荐(1) 编辑

2014年12月17日

摘要: 【L4】N-Queens解题报告N-Queens Total Accepted: 16418 Total Submissions: 63309 MySubmissionsThe n-queens puzzle is the problem of placing n queens on an n×nc... 阅读全文
posted @ 2014-12-17 19:09 Yu's Garden 阅读(993) 评论(0) 推荐(0) 编辑

2014年12月16日

摘要: 网上看到的一篇好文,转给大家看看-----------------------------------------------找到一份好工作,或者求其次,找到一份工作,不外乎几个基本条件:job opening, competitor, capability, resume and network。... 阅读全文
posted @ 2014-12-16 16:38 Yu's Garden 阅读(1952) 评论(8) 推荐(0) 编辑

2014年12月15日

摘要: Kth Largest ElementFind K-th largest element in an array.NoteYou can swap elements in the arrayExampleIn array[9,3,2,4,8], the 3th largest element is ... 阅读全文
posted @ 2014-12-15 14:30 Yu's Garden 阅读(6992) 评论(0) 推荐(0) 编辑

2014年12月14日

摘要: Reverse IntegerReverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.SOLUTION 1:注意越界后返回0.先用l... 阅读全文
posted @ 2014-12-14 08:25 Yu's Garden 阅读(2148) 评论(0) 推荐(0) 编辑

2014年12月13日

摘要: First Bad Version http://lintcode.com/en/problem/first-bad-versionThe code base version is an integer and start from 1 to n. One day, someone commit... 阅读全文
posted @ 2014-12-13 20:56 Yu's Garden 阅读(6332) 评论(0) 推荐(0) 编辑
摘要: Find first K frequency numbers/** Input: int[] A = {1, 1, 2, 3, 4, 5, 2}; k = 3* return the highest frequency numbers.* return: [1, 2, 3] or [1, 2, 4]... 阅读全文
posted @ 2014-12-13 00:07 Yu's Garden 阅读(462) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 17 下一页

导航