代码改变世界

阅读排行榜

[LeetCode] 11. Container With Most Water_Medium tag: two pointers

2021-08-05 01:33 by Johnson_强生仔仔, 18 阅读, 收藏,
摘要: 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 endp 阅读全文

[LeetCode] 1944. Number of Visible People in a Queue_Hard tag: stack

2023-10-11 05:27 by Johnson_强生仔仔, 17 阅读, 收藏,
摘要: There are n people standing in a queue, and they numbered from 0 to n - 1 in left to right order. You are given an array heights of distinct integers 阅读全文

[LeetCode]2. Add Two Numbers_Medium tag: Linked List

2021-07-27 22:00 by Johnson_强生仔仔, 17 阅读, 收藏,
摘要: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes conta 阅读全文

[LeetCode] 25. Reverse Nodes in k-Group_Hard tag: Linked List

2021-07-29 04:33 by Johnson_强生仔仔, 16 阅读, 收藏,
摘要: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer and is less than or equal to 阅读全文

[LeetCode] 22. Generate Parentheses_Medium tag: backtracking

2021-06-07 19:10 by Johnson_强生仔仔, 16 阅读, 收藏,
摘要: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. Example 1: Input: n = 3 Output: ["((()))","(() 阅读全文