05 2015 档案
摘要:题目:Given a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For e...
阅读全文
摘要:题目:All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful ...
阅读全文
摘要:题目:Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telep...
阅读全文
摘要:题目:Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.思路:面试过更简单的形式,判断两个string是否是anagram。...
阅读全文
摘要:题目:Given a 2D board containing'X'and'O', capture all regions surrounded by'X'.A region is captured by flipping all'O's into'X's in that surrounded reg...
阅读全文
摘要:题目:Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive inte...
阅读全文
摘要:题目:Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all dist...
阅读全文