摘要:
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... 阅读全文
摘要:
WordLadder解题报告Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only... 阅读全文
摘要:
N-Queens II (LEVEL 4 难度级别,最高级5)Follow up for N-Queens problem.Now, instead outputting board configurations, return the totalnumber of distinct solutio... 阅读全文
摘要:
REF: http://blog.csdn.net/fightforyourdream/article/details/15333405题目是一道简单的小程序,像下面这样:[java] view plaincopypublic class Test1 { public static void mai... 阅读全文
摘要:
【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... 阅读全文
摘要:
网上看到的一篇好文,转给大家看看-----------------------------------------------找到一份好工作,或者求其次,找到一份工作,不外乎几个基本条件:job opening, competitor, capability, resume and network。... 阅读全文
摘要:
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 ... 阅读全文
摘要:
Reverse IntegerReverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.SOLUTION 1:注意越界后返回0.先用l... 阅读全文
摘要:
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... 阅读全文
摘要:
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]... 阅读全文