leetcode
leetcode copied to clipboard
Provide all my solutions and explanations in Chinese for all the Leetcode coding problems.
Given a node from a Circular Linked List which is sorted in ascending order, write a function to insert a value `insertVal` into the list such that it remains a ...
In a given integer array A, we must move every element of A to either list B or list C. (B and C initially start empty.) Return true if and...
The `Employee` table holds all employees. Every employee has an Id, a salary, and there is also a column for the department Id. +----+-------+--------+--------------+ | Id | Name | Salary...
In a group of N people (labelled `0, 1, 2, ..., N-1`), each person has different amounts of money, and different levels of quietness. For convenience, we'll call the person...
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 user's news feed. Implement...
Given a nested list of integers, return the sum of all integers in the list weighted by their depth. Each element is either an integer, or a list -- whose...
Given a list of words, we may encode it by writing a reference string `S` and a list of indexes `A`. For example, if the list of words is `["time",...
Given a binary tree, flatten it to a linked list in-place. For example, Given 1 / \ 2 5 / \ \ 3 4 6 The flattened tree should look...
Given a list of `words`, list of single `letters` (might be repeating) and `score` of every character. Return the maximum score of any valid set of words formed by using...
Given a 2D `grid` consists of `0s` (land) and `1s` (water). An _island_ is a maximal 4-directionally connected group of `0s` and a _closed island_ is an island totally (all...