摘要:
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. 题目含义:给定一个升序的列表,构造一个平衡二叉树 平衡二叉树:二叉排序树集中了数 阅读全文
摘要:
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen 阅读全文
摘要:
Given an integer array, your task is to find all the different possible increasing subsequences of the given array, and the length of an increasing su 阅读全文
摘要:
Given an encoded string, return it's decoded string. The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is b 阅读全文
摘要:
There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For example, if A is a direct 阅读全文
摘要:
Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: All root-to-leaf paths are: 阅读全文
摘要:
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repeating 阅读全文
摘要:
Design a simplified version of Twitter where users can post tweets, follow/unfollow another user and is able to see the 10 most recent tweets in the u 阅读全文
摘要:
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 deep copy 阅读全文
摘要:
All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to 阅读全文