- 博客(359)
- 收藏
- 关注
原创 【Android】Intent
Intent实现组件间通信(Activity/Service/BroadcastReceiver),封装操作指令与数据传输逻辑。
2025-05-02 23:19:21
800
原创 【Android】四大组件
Activity管界面,Service管后台,BroadcastReceiver管消息,ContentProvider管数据。
2025-05-01 21:12:29
568
原创 【Android】四大组件之BroadcastReceiver
BroadcastReceiver用于监听系统或应用发出的广播事件,实现跨组件通信。
2025-05-01 10:43:51
1298
原创 Leetcode-138. Copy List with Random Pointer [C++][Java]
A linked list of length n is given such that each node contains an additional random pointer, which could point to any node in the list, or null.
2025-03-22 18:16:55
657
原创 Leetcode-1278.Palindrome Partitioning IV [C++][Java]
Given a string s, return true if it is possible to split the string s into three non-empty palindromic substrings. Otherwise, return false.
2025-03-16 21:56:21
913
原创 Leetcode-1278.Palindrome Partitioning III [C++][Java]
You are given a string s containing lowercase letters and an integer k. You need to : First, change some characters of s to other lowercase English letters. Then divide s into k non-empty disjoint substrings such that each substring is a palindrome.
2025-03-16 21:01:00
1108
原创 Leetcode-132.Palindrome Partitioning II [C++][Java]
Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning of s.
2025-03-16 20:05:21
996
原创 Leetcode-131.Palindrome Partitioning [C++][Java]
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s.
2025-03-16 18:59:45
724
原创 Leetcode-2272. Substring With Largest Variance [C++][Java]
The variance of a string is defined as the largest difference between the number of occurrences of any 2 characters present in the string.
2025-03-16 12:11:39
678
原创 Leetcode-407. Trapping Rain Water II [C++][Java]
Given an m x n integer matrix heightMap representing the height of each unit cell in a 2D elevation map, return the volume of water it can trap after raining.
2025-02-23 20:40:43
430
原创 Leetcode-42. Trapping Rain Water [C++][Java]
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.
2025-02-23 19:48:10
468
原创 Leetcode-668. Kth Smallest Number in Multiplication Table[C++][Java]
Given three integers m, n, and k, return the kth smallest element in the m x n multiplication table.
2025-02-23 18:04:45
446
原创 Leetcode-84. Largest Rectangle in Histogram [C++][Java]
Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle in the histogram.
2025-02-23 17:39:25
336
原创 LeetCode-85. Maximal Rectangle [C++][Java]
Given a binary filled with 's and 's, find the largest rectangle containing only 's and return its area.
2025-02-23 17:11:32
454
原创 二叉树中每个节点能到达的最远距离
输入一个只包含0和1的字符串表示二叉树,输出每个节点能到达的最远距离,通过父节点的路径也要考虑。比如输入"111110000010000", 输出[3,2,4,3,3,4]。
2025-02-23 16:04:12
196
原创 LeetCode-315. Count of Smaller Numbers After Self
Given an integer arraynums, returnan integer arraycountswherecounts[i]is the number of smaller elements to the right ofnums[i].
2024-11-30 15:12:41
704
原创 LeetCode-632. Smallest Range Covering Elements from K Lists [C++][Java]
You have k lists of sorted integers in non-decreasing order. Find the smallest range that includes at least one number from each of the k lists.
2024-11-24 11:33:59
848
1
原创 Windows上通过VirtualBox安装Linux虚拟机
在Windows系统中,通过VirtualBox,创建一个基于Linux内核的操作系统。
2024-09-16 12:23:15
4437
7
原创 《剑指offer》82--二叉树中和为某一值的路径(一)[C++][Java]
《剑指offer》82--二叉树中和为某一值的路径(一)[C++][Java]
2024-01-28 11:07:07
519
原创 《剑指offer》81--调整数组顺序使奇数位于偶数前面(二)[C++][Java]
《剑指offer》81--调整数组顺序使奇数位于偶数前面(二)[C++][Java]
2024-01-28 09:50:13
518
原创 LeetCode-2415. Reverse Odd Levels of Binary Tree [C++][Java]
Given therootof aperfectbinary tree, reverse the node values at eachoddlevel of the tree.
2022-12-15 22:49:21
694
原创 LeetCode常见题型——图
图是树的升级版。图通常分为有向(directed)或无向(undirected),有循环(cyclic)或无循环(acyclic),所有节点相连(connected)或不相连(disconnected)。
2022-08-22 08:09:55
635
原创 LeetCode-432. All O`one Data Structure [C++][Java]
Design a data structure to store the strings' count with the ability to return the strings with minimum and maximum counts.
2022-08-22 08:01:04
330
原创 LeetCode-380. Insert Delete GetRandom O(1) [C++][Java]
You must implement the functions of the class such that each function works inaverageO(1)time complexity.
2022-08-21 22:21:03
395
原创 LeetCode-146. LRU Cache [C++][Java]
Design a data structure that follows the constraints of aLeast Recently Used (LRU) cache.
2022-08-21 22:11:44
1213
原创 LeetCode-684. Redundant Connection [C++][Java]
You are given a graph that started as a tree withnnodes labeled from1ton, with one additional edge added. The added edge has twodifferentvertices chosen from1ton, and was not an edge that already existed. The graph is represented as an arrayedge
2022-08-21 21:59:13
290
原创 LeetCode-882. Reachable Nodes In Subdivided Graph [C++][Java]
In thisnew graph, you want to know how many nodes arereachablefrom the node0, where a node isreachableif the distance ismaxMovesor less.Given the original graph andmaxMoves, returnthe number of nodes that arereachablefrom node0in the new gr
2022-08-21 21:32:30
340
原创 LeetCode-1135. Connecting Cities With Minimum Cost [C++][Java]
Return the minimum cost so that for every pair of cities, there exists a pathof connections (possibly of length 1) that connects those two cities together. The cost is the sum of the connection costs used. If the task is impossible, return -1.
2022-08-21 11:23:31
589
原创 LeetCode-1059. All Paths from Source Lead to Destination [C++][Java]
Given the edges of a directed graph, and two nodes source and destination of this graph, determine whether or not all paths starting from source eventually end at destination,this problem is pretty straight forward.
2022-08-20 08:48:58
268
原创 LeetCode-207. Course Schedule [C++][Java]
There are a total ofnumCoursescourses you have to take, labeled from0tonumCourses - 1. You are given an arrayprerequisiteswhereprerequisites[i] = [ai, bi]indicates that youmusttake coursebifirst if you want to take courseai. reuturn true .......
2022-08-19 07:51:47
339
原创 LeetCode-210. Course Schedule II [C++][Java]
There are a total ofnumCoursescourses you have to take, labeled from0tonumCourses - 1. You are given an arrayprerequisiteswhereprerequisites[i] = [ai, bi]indicates that youmusttake coursebifirst if you want to take courseai.
2022-08-19 07:44:25
372
原创 LeetCode-785. Is Graph Bipartite? [C++][Java]
There is anundirectedgraph withnnodes, where each node is numbered between0andn - 1. You are given a 2D arraygraph, wheregraph[u]is an array of nodes that nodeuis adjacent to. More formally, for eachvingraph[u], there is an undirected edge b...
2022-08-18 08:12:06
311
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人