来自stackoverflow的题目Why is processing a sorted array faster than an unsorted array?...
分类:
编程语言 时间:
2014-10-12 18:15:58
阅读次数:
296
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.
Given an integer n, return all distinct solutions to the n-queens puzzle...
分类:
其他好文 时间:
2014-10-12 16:58:58
阅读次数:
248
Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Write a function to determine if a given target is in the...
分类:
其他好文 时间:
2014-10-12 16:06:48
阅读次数:
185
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
For example,
Given 1->2->3->3->4->4->5, return 1->2->5.
Given 1->1-...
分类:
其他好文 时间:
2014-10-12 15:51:58
阅读次数:
190
N-QueensThen-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all...
分类:
其他好文 时间:
2014-10-12 15:11:58
阅读次数:
263
Given a sorted linked list, delete all duplicates such that each element appear only once.
For example,
Given 1->1->2, return 1->2.
Given 1->1->2->3->3, return 1->2->3.
/**
* Definition for s...
分类:
其他好文 时间:
2014-10-12 13:59:18
阅读次数:
182
Problem
You receive a credit C at a local store and would like to buy two items. You first walk through the store and create a list L of
all available items. From this list you would like to buy tw...
分类:
其他好文 时间:
2014-10-12 12:38:28
阅读次数:
241
#encoding=utf-8__author__ = 'kevinlu1010@qq.com'################# python自带的排序接口 ###################### python内带非常强大的排序函数,sorted,或sort# sorted是内建函数,sor...
分类:
编程语言 时间:
2014-10-12 11:54:27
阅读次数:
242
It is quite a basic problem. However I spent half an hour solving it and made two mistakes. Guess it's because I haven't written some fundamental data structures like linked list for a while and kind...
分类:
其他好文 时间:
2014-10-12 09:08:27
阅读次数:
176
Disky and Sooma, two of the biggest mega minds of Bangladesh went to a far country. They ate, coded and wandered around, even in their holidays. They passed several months in this way. But everything ...
分类:
其他好文 时间:
2014-10-12 02:44:17
阅读次数:
316