摘要:
TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http 阅读全文
摘要:
You're given strings J representing the types of stones that are jewels, and Srepresenting the stones you have. Each character in S is a type of stone 阅读全文
摘要:
Design a HashMap without using any built-in hash table libraries. To be specific, your design should include these functions: put(key, value) : Insert 阅读全文
摘要:
A website domain like "discuss.leetcode.com" consists of various subdomains. At the top level, we have "com", at the next level, we have "leetcode.com 阅读全文
摘要:
An image is represented by a 2-D array of integers, each integer representing the pixel value of the image (from 0 to 65535). Given a coordinate (sr, 阅读全文
摘要:
Given a binary tree Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL 阅读全文
摘要:
Given a binary tree, count the number of uni-value subtrees. A Uni-value subtree means all nodes of the subtree have the same value. Example : 两次recur 阅读全文
摘要:
Given a binary tree, return the inorder traversal of its nodes' values. Example: Input: [1,null,2,3] 1 \ 2 / 3 Output: [1,3,2] Follow up: Recursive so 阅读全文
摘要:
Given a binary tree Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL 阅读全文
摘要:
Given a binary search tree and a node in it, find the in-order successor of that node in the BST. Note: If the given node has no in-order successor in 阅读全文