12 2018 档案

摘要:题目如下: Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 231 - 1. Example 1: Example 2: Exa 阅读全文
posted @ 2018-12-31 21:28 seyjs 阅读(172) 评论(0) 推荐(0)
摘要:题目如下: Given a wordlist, we want to implement a spellchecker that converts a query word into a correct word. For a given query word, the spell checker 阅读全文
posted @ 2018-12-31 17:05 seyjs 阅读(548) 评论(0) 推荐(0)
摘要:题目如下: A binary tree is univalued if every node in the tree has the same value. Return true if and only if the given tree is univalued. Example 1: Exam 阅读全文
posted @ 2018-12-31 11:27 seyjs 阅读(321) 评论(0) 推荐(0)
摘要:题目如下: Return all non-negative integers of length N such that the absolute difference between every two consecutive digits is K. Note that every number 阅读全文
posted @ 2018-12-31 11:25 seyjs 阅读(318) 评论(0) 推荐(0)
摘要:题目如下: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserv 阅读全文
posted @ 2018-12-29 10:25 seyjs 阅读(105) 评论(0) 推荐(0)
摘要:题目如下: Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and n 阅读全文
posted @ 2018-12-28 21:47 seyjs 阅读(145) 评论(0) 推荐(0)
摘要:题目如下: Given an array A of integers, a ramp is a tuple (i, j) for which i < j and A[i] <= A[j]. The width of such a ramp is j - i. Find the maximum wid 阅读全文
posted @ 2018-12-26 15:01 seyjs 阅读(327) 评论(0) 推荐(0)
摘要:题目如下: Given a set of points in the xy-plane, determine the minimum area of any rectangle formed from these points, with sides not necessarily parallel 阅读全文
posted @ 2018-12-26 14:45 seyjs 阅读(462) 评论(0) 推荐(0)
摘要:题目如下: In a array A of size 2N, there are N+1 unique elements, and exactly one of these elements is repeated N times. Return the element repeated N tim 阅读全文
posted @ 2018-12-24 13:33 seyjs 阅读(230) 评论(0) 推荐(0)
摘要:题目如下: Given a set of points in the xy-plane, determine the minimum area of a rectangle formed from these points, with sides parallel to the x and y ax 阅读全文
posted @ 2018-12-24 13:29 seyjs 阅读(497) 评论(0) 推荐(0)
摘要:题目如下: In a N x N grid composed of 1 x 1 squares, each 1 x 1 square consists of a /, \, or blank space. These characters divide the square into contigu 阅读全文
posted @ 2018-12-18 14:28 seyjs 阅读(690) 评论(0) 推荐(0)
摘要:题目如下: Given a binary tree, determine if it is a complete binary tree. Definition of a complete binary tree from Wikipedia:In a complete binary tree ev 阅读全文
posted @ 2018-12-18 10:41 seyjs 阅读(298) 评论(0) 推荐(0)
摘要:题目如下: There are 8 prison cells in a row, and each cell is either occupied or vacant. Each day, whether the cell is occupied or vacant changes accordin 阅读全文
posted @ 2018-12-18 10:35 seyjs 阅读(1376) 评论(0) 推荐(0)
摘要:题目如下: Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. All of th 阅读全文
posted @ 2018-12-12 10:40 seyjs 阅读(120) 评论(0) 推荐(0)
摘要:题目如下: In an alien language, surprisingly they also use english lowercase letters, but possibly in a different order. The order of the alphabet is some 阅读全文
posted @ 2018-12-09 19:14 seyjs 阅读(736) 评论(0) 推荐(0)
摘要:题目如下: Given an array of integers A with even length, return true if and only if it is possible to reorder it such that A[2 * i + 1] = 2 * A[2 * i] for 阅读全文
posted @ 2018-12-09 19:11 seyjs 阅读(500) 评论(0) 推荐(0)
摘要:题目如下: We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose any set of deletion indices, and for each stri 阅读全文
posted @ 2018-12-09 19:05 seyjs 阅读(471) 评论(0) 推荐(0)
摘要:题目如下: Given two integers n and k, you need to construct a list which contains ndifferent positive integers ranging from 1 to n and obeys the following 阅读全文
posted @ 2018-12-09 09:42 seyjs 阅读(197) 评论(0) 推荐(0)
摘要:题目如下: For a binary tree T, we can define a flip operation as follows: choose any node, and swap the left and right child subtrees. A binary tree X is  阅读全文
posted @ 2018-12-07 17:53 seyjs 阅读(349) 评论(0) 推荐(0)
摘要:题目如下: Given an array of 4 digits, return the largest 24 hour time that can be made. The smallest 24 hour time is 00:00, and the largest is 23:59. Star 阅读全文
posted @ 2018-12-03 14:45 seyjs 阅读(479) 评论(0) 推荐(0)
摘要:题目如下: In a deck of cards, every card has a unique integer. You can order the deck in any order you want. Initially, all the cards start face down (unr 阅读全文
posted @ 2018-12-03 14:40 seyjs 阅读(599) 评论(0) 推荐(0)