Leetcode 2021-11-10

81. Search in Rotated Sorted Array II (Medium)

There is an integer array nums sorted in non-decreasing order (not necessarily with distinct values).

阅读全文 »

Leetcode 2021-11-09

71. Simplify Path (Medium)

Given a string path, which is an absolute path (starting with a slash '/') to a file or directory in a Unix-style file system, convert it to the simplified canonical path.

阅读全文 »

Leetcode 2021-11-06

51. N-Queens (Hard)

The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other.

阅读全文 »

Leetcode 2021-11-04

31. Next Permutation (Medium)

Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.

阅读全文 »

Leetcode 2021-11-03

21. Merge Two Sorted Lists (Easy)

Merge two sorted linked lists and return it as a sorted list. The list should be made by splicing together the nodes of the first two lists.

阅读全文 »

Leetcode 2021-11-02

11. Container With Most Water (Medium)

Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of the line i is at (i, ai) and (i, 0). Find two lines, which, together with the x-axis forms a container, such that the container contains the most water.

阅读全文 »

Leetcode 2021-11-01

1. Two Sum (Easy)

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.

阅读全文 »

关于

记录下刷题过程以及一些随机想法~~