Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:
其他好文 时间:
2014-10-26 21:10:30
阅读次数:
170
A function can return any number of results.This function returns two strings.package mainimport "fmt"func swap(x, y string) (string, string) { ret...
分类:
其他好文 时间:
2014-10-26 21:00:32
阅读次数:
143
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target, whe...
分类:
其他好文 时间:
2014-10-26 17:04:21
阅读次数:
193
keys_.keys(object)
Retrieve all the names of the object's properties.
_.keys({one: 1, two: 2, three: 3});
=> ["one", "two", "three"]
values_.values(object)
Return all of the values of the obje...
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-26 14:23:18
阅读次数:
164
【题目】
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it...
分类:
其他好文 时间:
2014-10-26 14:21:29
阅读次数:
243
DescriptionYou all are familiar with the famous 8-queens problem which asks you to place 8 queens on a chess board so no two attack each other. In thi...
分类:
其他好文 时间:
2014-10-26 14:17:03
阅读次数:
207
My story happened in the winter of 2012, the first year I began to work in Beijing. It was a cold weekend, and I went skiing with two of my coworker.....
分类:
其他好文 时间:
2014-10-26 01:38:41
阅读次数:
142
题目:Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or eq...
分类:
编程语言 时间:
2014-10-26 00:21:33
阅读次数:
216
Solution: when see question about two strings , DP should be considered first.We can abstract this question to calculate appear times for string T wit...
分类:
其他好文 时间:
2014-10-26 00:12:57
阅读次数:
211