摘要:
You are given an array representing a row of seats where seats[i] = 1 represents a person sitting in the ith seat, and seats[i] = 0 represents that th 阅读全文
阅读排行榜
[LeetCode] 157. Read N Characters Given Read4_Easy tag: array
2021-08-09 10:35 by Johnson_强生仔仔, 26 阅读, 收藏,
摘要:
Given a file and assume that you can only read the file using a given method read4, implement a method to read n characters. Method read4: The API rea 阅读全文
[LeetCode] 684. Redundant Connection _ Medium tag: Union Find
2021-07-30 14:40 by Johnson_强生仔仔, 26 阅读, 收藏,
摘要:
I n this problem, a tree is an undirected graph that is connected and has no cycles. You are given a graph that started as a tree with n nodes labeled 阅读全文
[LeetCode] 77. Combinations_Medium tag: backtracking
2021-07-14 10:18 by Johnson_强生仔仔, 25 阅读, 收藏,
摘要:
Given two integers n and k, return all possible combinations of k numbers out of the range [1, n]. You may return the answer in any order. Example 1: 阅读全文
Data structure - Stack 小结及leetcode相关题目
2023-10-11 05:26 by Johnson_强生仔仔, 24 阅读, 收藏,
摘要:
Linear data structure - Stack O(1) for push O(1) for pop O(1) for top - Basic skills 先进后出 [LeetCode] 232. Implement Queue using Stacks_Easy tag: stack 阅读全文
浙公网安备 33010602011771号