上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 22 下一页
摘要: here 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 th 阅读全文
posted @ 2017-09-11 10:31 YuriFLAG 阅读(181) 评论(0) 推荐(0)
摘要: Given two variables, x and y, swap two variables without using a third variable. Given two variables, x and y, swap two variables without using a thir 阅读全文
posted @ 2017-08-14 10:56 YuriFLAG 阅读(241) 评论(0) 推荐(0)
摘要: Divide two integers without using multiplication, division and mod operator. If it is overflow, return 2147483647 Have you met this question in a real 阅读全文
posted @ 2017-08-10 11:20 YuriFLAG 阅读(183) 评论(0) 推荐(0)
摘要: Given two array of integers(the first array is array A, the second array is array B), now we are going to find a element in array A which is A[i], and 阅读全文
posted @ 2017-08-01 10:56 YuriFLAG 阅读(170) 评论(0) 推荐(0)
摘要: Given a binary tree, return the preorder traversal of its nodes' values. Example Given: 1 / \ 2 3 / \ 4 5 return [1,2,4,5,3]. without using recursion. 阅读全文
posted @ 2017-07-25 10:45 YuriFLAG 阅读(90) 评论(0) 推荐(0)
摘要: Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also be integ 阅读全文
posted @ 2017-07-24 11:18 YuriFLAG 阅读(115) 评论(0) 推荐(0)
摘要: Find the second max number in a given array. Example Given [1, 3, 2, 4], return 3. Given [1, 2], return 1. Notice : Attention corner case. Communicate 阅读全文
posted @ 2017-07-21 11:33 YuriFLAG 阅读(168) 评论(0) 推荐(0)
摘要: Given n nodes in a graph labeled from 1 to n. There is no edges in the graph at beginning. You need to support the following method:1. connect(a, b), 阅读全文
posted @ 2017-07-16 19:59 YuriFLAG 阅读(135) 评论(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-07-15 21:35 YuriFLAG 阅读(119) 评论(0) 推荐(0)
摘要: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjac 阅读全文
posted @ 2017-07-15 19:15 YuriFLAG 阅读(208) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 22 下一页