08 2017 档案

摘要:Given an 2D board, count how many battleships are in it. The battleships are represented with 'X's, empty slots are represented with '.'s. You may ass 阅读全文
posted @ 2017-08-28 15:21 Pickle 阅读(168) 评论(0) 推荐(0) 编辑
摘要:Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the 阅读全文
posted @ 2017-08-23 14:46 Pickle 阅读(351) 评论(0) 推荐(0) 编辑
摘要:Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. The update(i, val) function modifies nums by upd 阅读全文
posted @ 2017-08-23 13:44 Pickle 阅读(173) 评论(0) 推荐(0) 编辑
摘要:Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother to make the gray scale of each cell becomes the ave 阅读全文
posted @ 2017-08-22 11:15 Pickle 阅读(388) 评论(0) 推荐(0) 编辑
摘要:Given a sorted array consisting of only integers where every element appears twice except for one element which appears once. Find this single element 阅读全文
posted @ 2017-08-18 10:53 Pickle 阅读(170) 评论(0) 推荐(0) 编辑
摘要:Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to the or 阅读全文
posted @ 2017-08-15 17:52 Pickle 阅读(318) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree, return the tilt of the whole tree. The tilt of a tree node is defined as the absolute difference between the sum of all left subt 阅读全文
posted @ 2017-08-11 19:41 Pickle 阅读(133) 评论(0) 推荐(0) 编辑
摘要:For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now i 阅读全文
posted @ 2017-08-11 19:23 Pickle 阅读(168) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function 阅读全文
posted @ 2017-08-10 14:16 Pickle 阅读(134) 评论(0) 推荐(0) 编辑
摘要:Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given target. E 阅读全文
posted @ 2017-08-10 13:20 Pickle 阅读(444) 评论(0) 推荐(0) 编辑
摘要:Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when one of 阅读全文
posted @ 2017-08-10 11:45 Pickle 阅读(133) 评论(0) 推荐(0) 编辑
摘要:Given an integer array with no duplicates. A maximum tree building on this array is defined as follow: Construct the maximum tree by the given array a 阅读全文
posted @ 2017-08-10 11:32 Pickle 阅读(528) 评论(0) 推荐(0) 编辑
摘要:Given two strings representing two complex numbers. You need to return a string representing their multiplication. Note i2 = -1 according to the defin 阅读全文
posted @ 2017-08-10 11:17 Pickle 阅读(207) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear twi 阅读全文
posted @ 2017-08-10 10:50 Pickle 阅读(128) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree, find the leftmost value in the last row of the tree. Example 1: Example 2: 阅读全文
posted @ 2017-08-09 18:33 Pickle 阅读(101) 评论(0) 推荐(0) 编辑
摘要:Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and r 阅读全文
posted @ 2017-08-09 17:52 Pickle 阅读(90) 评论(0) 推荐(0) 编辑
摘要:Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all 阅读全文
posted @ 2017-08-09 15:59 Pickle 阅读(106) 评论(0) 推荐(0) 编辑
摘要:Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a 阅读全文
posted @ 2017-08-09 14:52 Pickle 阅读(153) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longestpath betwee 阅读全文
posted @ 2017-08-09 11:19 Pickle 阅读(118) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] 阅读全文
posted @ 2017-08-08 15:40 Pickle 阅读(111) 评论(0) 推荐(0) 编辑
摘要:You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/ve 阅读全文
posted @ 2017-08-08 14:55 Pickle 阅读(129) 评论(0) 推荐(0) 编辑
摘要:You need to construct a string consists of parenthesis and integers from a binary tree with the preorder traversing way. The null node needs to be rep 阅读全文
posted @ 2017-08-07 19:19 Pickle 阅读(166) 评论(0) 推荐(0) 编辑
摘要:Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defi 阅读全文
posted @ 2017-08-07 17:54 Pickle 阅读(154) 评论(0) 推荐(0) 编辑
摘要:Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. Example 1: Input: 3 / \ 9 20 / \ 15 7 Outp 阅读全文
posted @ 2017-08-07 17:42 Pickle 阅读(206) 评论(0) 推荐(0) 编辑
摘要:In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data. 阅读全文
posted @ 2017-08-03 18:43 Pickle 阅读(146) 评论(0) 推荐(0) 编辑
摘要:Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of th 阅读全文
posted @ 2017-08-03 18:25 Pickle 阅读(149) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示