上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 45 下一页
摘要: Given a non-empty string containing an out-of-order English representation of digits 0-9, output the digits in ascending order. Note: Example 1: Examp 阅读全文
posted @ 2016-10-25 12:16 Grandyang 阅读(5829) 评论(0) 推荐(0)
摘要: Given a sequence of words, check whether it forms a valid word square. A sequence of words forms a valid word square if the kth row and column read th 阅读全文
posted @ 2016-10-24 06:26 Grandyang 阅读(8170) 评论(0) 推荐(0)
摘要: Given a non-empty array of numbers, a0, a1, a2, … , an-1, where 0 ≤ ai < 231. Find the maximum result of ai XOR aj, where 0 ≤ i, j < n. Could you do t 阅读全文
posted @ 2016-10-23 23:57 Grandyang 阅读(17336) 评论(5) 推荐(0)
摘要: A password is considered strong if below conditions are all met: Write a function strongPasswordChecker(s), that takes a string s as input, and return 阅读全文
posted @ 2016-10-22 23:54 Grandyang 阅读(10320) 评论(5) 推荐(0)
摘要: Given an integer array nums, return the third distinct maximum number in this array. If the third maximum does not exist, return the maximum number. E 阅读全文
posted @ 2016-10-20 23:47 Grandyang 阅读(13751) 评论(6) 推荐(0)
摘要: 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 @ 2016-10-19 23:39 Grandyang 阅读(11168) 评论(6) 推荐(0)
摘要: Given a rows x cols screen and a sentence represented by a list of words, find how many times the given sentence can be fitted on the screen. Note: Ex 阅读全文
posted @ 2016-10-18 22:53 Grandyang 阅读(15932) 评论(3) 推荐(0)
摘要: 今天遇到个很奇怪的问题,文件浏览器File Explorer无法正常显示,点击打开后任务栏上已经显示打开了,但是屏幕上却看不到任何窗口,开始以为机子中了恶意的木马,然后就疯狂的查毒,然而并没有解决问题,简直要抓狂了,差点就要重装系统了。最后终于发现了原因了,因为我用的是多屏幕显示,我当时没有打开右边 阅读全文
posted @ 2016-10-17 04:37 Grandyang 阅读(399) 评论(0) 推荐(0)
摘要: A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the 阅读全文
posted @ 2016-10-17 01:27 Grandyang 阅读(10187) 评论(2) 推荐(0)
摘要: Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the numbe 阅读全文
posted @ 2016-10-16 13:25 Grandyang 阅读(5893) 评论(3) 推荐(0)
摘要: Given an m x n matrix of non-negative integers representing the height of each unit cell in a continent, the "Pacific ocean" touches the left and top 阅读全文
posted @ 2016-10-14 23:33 Grandyang 阅读(16244) 评论(8) 推荐(1)
摘要: Given a string, find the length of the longest substring without repeating characters. Have you met this question in a real interview? Yes Given a str 阅读全文
posted @ 2016-10-13 23:58 Grandyang 阅读(903) 评论(0) 推荐(0)
摘要: Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both 阅读全文
posted @ 2016-10-12 07:42 Grandyang 阅读(31483) 评论(31) 推荐(3)
摘要: Reverse a linked list. Have you met this question in a real interview? Yes Reverse a linked list. Reverse a linked list. Have you met this question in 阅读全文
posted @ 2016-10-11 22:32 Grandyang 阅读(785) 评论(0) 推荐(0)
摘要: There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. There are two sorted arrays A and B of siz 阅读全文
posted @ 2016-10-10 04:33 Grandyang 阅读(1549) 评论(0) 推荐(0)
摘要: Given two non-negative numbers num1 and num2 represented as string, return the sum of num1 and num2. Note: The length of both num1 and num2 is < 5100. 阅读全文
posted @ 2016-10-09 23:59 Grandyang 阅读(11867) 评论(3) 推荐(1)
摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Have you met this question in a real interview? Yes 阅读全文
posted @ 2016-10-08 23:58 Grandyang 阅读(1088) 评论(0) 推荐(0)
摘要: A string such as "word" contains the following abbreviations: ["word", "1ord", "w1rd", "wo1d", "wor1", "2rd", "w2d", "wo2", "1o1d", "1or1", "w1r1", "1 阅读全文
posted @ 2016-10-07 13:27 Grandyang 阅读(10012) 评论(0) 推荐(0)
摘要: Given an array which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays. Write an algor 阅读全文
posted @ 2016-10-06 14:11 Grandyang 阅读(25187) 评论(26) 推荐(1)
摘要: Given a string s which consists of lowercase or uppercase letters, return the length of the longest palindrome that can be built with those letters. L 阅读全文
posted @ 2016-10-05 10:45 Grandyang 阅读(14842) 评论(2) 推荐(0)
摘要: Given a non-empty string s and an abbreviation abbr, return whether the string matches with the given abbreviation. A string such as "word" contains o 阅读全文
posted @ 2016-10-04 13:09 Grandyang 阅读(10590) 评论(0) 推荐(0)
摘要: Given an m x n matrix of positive integers representing the height of each unit cell in a 2D elevation map, compute the volume of water it is able to 阅读全文
posted @ 2016-10-03 12:32 Grandyang 阅读(20404) 评论(14) 推荐(7)
摘要: Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers(h, k), where h is the height of the perso 阅读全文
posted @ 2016-10-02 23:58 Grandyang 阅读(20853) 评论(11) 推荐(1)
摘要: Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement method is used. Note: Example 1: Example 2: 阅读全文
posted @ 2016-10-01 23:53 Grandyang 阅读(8756) 评论(7) 推荐(0)
摘要: Find the sum of all left leaves in a given binary tree. Example: 这道题让我们求一棵二叉树的所有左子叶的和,那么看到这道题我们知道这肯定是考二叉树的遍历问题,那么最简洁的写法肯定是用递归,由于我们只需要累加左子叶之和,那么我们在进入递归 阅读全文
posted @ 2016-09-30 13:40 Grandyang 阅读(9982) 评论(1) 推荐(0)
摘要: Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get the 阅读全文
posted @ 2016-09-24 09:55 Grandyang 阅读(2471) 评论(2) 推荐(0)
摘要: A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59). Each LED represents 阅读全文
posted @ 2016-09-22 15:10 Grandyang 阅读(11298) 评论(6) 推荐(0)
摘要: Given an integer n, return the nth digit of the infinite integer sequence [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...]. Example 1: Input: n = 3 Output: 3 阅读全文
posted @ 2016-09-21 10:59 Grandyang 阅读(13844) 评论(1) 推荐(1)
摘要: A frog is crossing a river. The river is divided into x units and at each unit there may or may not exist a stone. The frog can jump on a stone, but i 阅读全文
posted @ 2016-09-20 13:16 Grandyang 阅读(18874) 评论(13) 推荐(0)
摘要: Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible. Note: The l 阅读全文
posted @ 2016-09-19 04:04 Grandyang 阅读(18489) 评论(4) 推荐(3)
摘要: 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 n 阅读全文
posted @ 2016-09-18 06:33 Grandyang 阅读(1550) 评论(0) 推荐(0)
摘要: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of 阅读全文
posted @ 2016-09-18 05:33 Grandyang 阅读(1413) 评论(0) 推荐(0)
摘要: Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given 阅读全文
posted @ 2016-09-17 23:59 Grandyang 阅读(18650) 评论(10) 推荐(2)
摘要: A星(A*, A Star)算法详解 CSDN技术主题月 “深度学习”代码笔记专栏 UC Berkeley CS188 Intro to AI 阅读全文
posted @ 2016-09-16 00:25 Grandyang 阅读(631) 评论(0) 推荐(0)
摘要: Given an array of integers with possible duplicates, randomly output the index of a given target number. You can assume that the given target number m 阅读全文
posted @ 2016-09-15 21:45 Grandyang 阅读(14711) 评论(7) 推荐(0)
摘要: Given a positive integer n and you can do operations as follow: What is the minimum number of replacements needed for n to become 1? Example 1: Exampl 阅读全文
posted @ 2016-09-14 20:57 Grandyang 阅读(9213) 评论(6) 推荐(0)
摘要: Given an array of integers A and let n to be its length. Assume Bk to be an array obtained by rotating the array A k positions clock-wise, we define a 阅读全文
posted @ 2016-09-13 21:02 Grandyang 阅读(8822) 评论(4) 推荐(2)
摘要: There are n coins with different value in a line. Two players take turns to take one or two coins from left side until there are no more coins left. T 阅读全文
posted @ 2016-09-12 12:15 Grandyang 阅读(3423) 评论(3) 推荐(0)
摘要: There are n coins in a line. Two players take turns to take one or two coins from right side until there are no more coins left. The player who take t 阅读全文
posted @ 2016-09-11 12:42 Grandyang 阅读(2327) 评论(0) 推荐(0)
摘要: There is a list of sorted integers from 1 to n. Starting from left to right, remove the first number and every other number afterward until you reach 阅读全文
posted @ 2016-09-10 23:36 Grandyang 阅读(10533) 评论(3) 推荐(0)
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 45 下一页
Fork me on GitHub