上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 54 下一页
摘要: 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 @ 2016-12-30 10:29 北叶青藤 阅读(205) 评论(0) 推荐(0)
摘要: Given an integer, write a function to determine if it is a power of three. Follow up:Could you do it without using any loop / recursion? 阅读全文
posted @ 2016-12-29 01:19 北叶青藤 阅读(156) 评论(0) 推荐(0)
摘要: Determine whether an integer is a palindrome. Do this without extra space. 分析:把一个数倒过来,然后看两个数是否相同。 Reverse digits of an integer. Example1: x = 123, ret 阅读全文
posted @ 2016-12-29 00:15 北叶青藤 阅读(235) 评论(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 not the 阅读全文
posted @ 2016-12-28 12:54 北叶青藤 阅读(217) 评论(0) 推荐(0)
摘要: Suppose we abstract our file system by a string in the following manner: The string "dir\n\tsubdir1\n\tsubdir2\n\t\tfile.ext" represents: dir subdir1 阅读全文
posted @ 2016-12-28 06:19 北叶青藤 阅读(200) 评论(0) 推荐(0)
摘要: Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrenc 阅读全文
posted @ 2016-12-27 04:30 北叶青藤 阅读(235) 评论(0) 推荐(0)
摘要: Question: For each word, you can get a list of neighbor words by calling getWords(String), find all the paths from word1 to word2. 阅读全文
posted @ 2016-12-24 12:49 北叶青藤 阅读(329) 评论(0) 推荐(0)
摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet 阅读全文
posted @ 2016-12-22 06:04 北叶青藤 阅读(158) 评论(0) 推荐(0)
摘要: Given two Binary Search Trees, find common nodes in them. In other words, find intersection of two BSTs. Example: from: http://www.geeksforgeeks.org/p 阅读全文
posted @ 2016-12-19 14:17 北叶青藤 阅读(369) 评论(0) 推荐(0)
摘要: Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. Th 阅读全文
posted @ 2016-12-17 23:56 北叶青藤 阅读(204) 评论(0) 推荐(0)
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 54 下一页