摘要:
Add Two Numbers II (M) 题目 You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and 阅读全文
摘要:
Find the Smallest Divisor Given a Threshold (M) 题目 Given an array of integers nums and an integer threshold, we will choose a positive integer divisor 阅读全文
摘要:
Minimum Cost to Move Chips to The Same Position (E) 题目 We have n chips, where the position of the ith chip is position[i]. We need to move all the chi 阅读全文
摘要:
Minimum Height Trees (M) 题目 A tree is an undirected graph in which any two vertices are connected by exactly one path. In other words, any connected g 阅读全文
摘要:
Consecutive Characters (E) 题目 Given a string s, the power of the string is the maximum length of a non-empty substring that contains only one unique c 阅读全文
摘要:
Insertion Sort List (M) 题目 Sort a linked list using insertion sort. A graphical example of insertion sort. The partial sorted list (black) initially c 阅读全文
摘要:
Convert Binary Number in a Linked List to Integer (E) 题目 Given head which is a reference node to a singly-linked list. The value of each node in the l 阅读全文
摘要:
Recover Binary Search Tree (H) 题目 You are given the root of a binary search tree (BST), where exactly two nodes of the tree were swapped by mistake. R 阅读全文
摘要:
Number of Longest Increasing Subsequence (M) 题目 Given an integer array nums, return the number of longest increasing subsequences. Example 1: Input: n 阅读全文
摘要:
Maximize Distance to Closest Person (M) 题目 You are given an array representing a row of seats where seats[i] = 1 represents a person sitting in the it 阅读全文