摘要:
题目如下: Given the head of a graph, return a deep copy (clone) of the graph. Each node in the graph contains a label (int) and a list (List[UndirectedGra 阅读全文
摘要:
题目如下: 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 o 阅读全文
摘要:
题目如下: 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: The dir 阅读全文
摘要:
题目如下: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffe 阅读全文
摘要:
题目如下: Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 231 - 1. Example 1: Example 2: Exa 阅读全文
摘要:
题目如下: Given a wordlist, we want to implement a spellchecker that converts a query word into a correct word. For a given query word, the spell checker 阅读全文
摘要:
题目如下: A binary tree is univalued if every node in the tree has the same value. Return true if and only if the given tree is univalued. Example 1: Exam 阅读全文
摘要:
题目如下: Return all non-negative integers of length N such that the absolute difference between every two consecutive digits is K. Note that every number 阅读全文
摘要:
题目如下: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserv 阅读全文
摘要:
题目如下: 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 n 阅读全文