摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
Question: For each word, you can get a list of neighbor words by calling getWords(String), find all the paths from word1 to word2. 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. Th 阅读全文
摘要:
Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: 阅读全文
摘要:
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 阅读全文
摘要:
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's undirected graph serialization: Nodes are labeled 阅读全文
摘要:
Design a data structure that supports all following operations in O(1) time. insert(val): Inserts an item val to the set if not already present.remove 阅读全文