1. 题目 Given two integers n and k, return all possible combinations of k numbers out of 1 … n. For exampl…
分类:LeetCode题目解答
[LeetCode] Design Phone Directory 设计电话目录
Design a Phone Directory which supports the following operations: get: Provide a number which is…
[LeetCode] Sliding Window Median 滑动窗口中位数
Median is the middle value in an ordered integer list. If the size of the list is even, there is no mid…
[LeetCode] Number of Distinct Islands II 不同岛屿的个数之二
Given a non-empty 2D array grid of 0’s and 1’s, an island is a group of…
LeetCode 200 Number of Islands
题目描述 Given a 2d grid map of ‘1’s (land) and ‘0’s (water), count the number of islands. An island is surrounded…
[Leetcode] Cheapest Flights Within K Stops K次转机最便宜机票
最新更新请见:https://yanjia.me/zh/2019/01/… There are n cities connected by m flights. Each fight starts from …
[LeetCode] Design Log Storage System 设计日志存储系统
You are given several logs that each log contains a unique id and timestamp. Timestamp is a string that…
LeetCode | Maximum Subarray
题目: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. F…
[LeetCode] Bulls and Cows 公母牛游戏
You are playing the following Bulls and Cows game with your friend: You write a 4-digit secre…
[LeetCode] Find Right Interval 找右区间
Given a set of intervals, for each of the interval i, check if there exists an interval j whose start p…
[LeetCode] Split Concatenated Strings 分割串联字符串
Given a list of strings, you could concatenate these strings together into a loop, where for each strin…
[LeetCode] Min Cost Climbing Stairs 爬楼梯的最小损失
On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). O…