摘要:
算法描述: Given a binary tree, return the preorder traversal of its nodes' values. Example: Follow up: Recursive solution is trivial, could you do it iter 阅读全文
摘要:
算法描述: Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You may not modify the values in the list's nodes, only nod 阅读全文
摘要:
算法描述: Given a linked list, return the node where the cycle begins. If there is no cycle, return null. To represent a cycle in the given linked list, w 阅读全文
摘要:
算法描述: Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separate 阅读全文
摘要:
算法描述: A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a dee 阅读全文
摘要:
算法描述: Given a non-empty array of integers, every element appears three times except for one, which appears exactly once. Find that single one. Note: Y 阅读全文
摘要:
算法描述: here are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it 阅读全文
摘要:
算法描述: 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 string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. Exam 阅读全文
摘要:
算法描述: Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X 阅读全文