![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
文章平均质量分 85
北路向一
这个作者很懒,什么都没留下…
展开
-
排序算法小结-左神
排序算法学习总结,对于归并排序,堆排序,及快排有深刻感悟!原创 2022-01-04 20:45:06 · 680 阅读 · 0 评论 -
LeetCode刷题之回溯算法的基础框架
17. 电话号码的字母组合class Solution { private Map<Integer,String> map = new HashMap<>(); List<String> list = new ArrayList<>(); //1.回溯算法 public List<String> letterCombinations(String digits) { if(digits =.原创 2021-10-20 14:20:42 · 129 阅读 · 0 评论 -
LeetCode刷题之剑指offer
剑指 offer 题目目录剑指 Offer 03. 数组中重复的数字方法一:借助HashSet去重class Solution { public int findRepeatNumber(int[] nums) { HashSet<Integer> set = new HashSet<>(); for(int a : nums){ if(set.contains(a)){ re.原创 2021-10-09 14:57:47 · 576 阅读 · 0 评论 -
LeetCode刷题之链表基础
19. 删除链表的倒数第 N 个结点class Solution { public ListNode removeNthFromEnd(ListNode head, int n) { ListNode dummy = new ListNode(-1); dummy.next = head; ListNode slow = dummy,fast = dummy.next; while(n > 0){ .原创 2021-09-01 20:28:42 · 173 阅读 · 0 评论 -
LeetCode刷题之二叉树总结
二叉树的遍历 1 / 2 3 / \ 4 5 6层次遍历顺序:[1 2 3 4 5 6]前序遍历顺序:[1 2 4 5 3 6] 根左右中序遍历顺序:[4 2 5 1 3 6] 左根右后序遍历顺序:[4 5 2 6 3 1] 左右根层次遍历使⽤ BFS 实现,利⽤的就是 BFS ⼀层⼀层遍历的特性;⽽前序、中序、后序遍历利⽤了 DFS 实现。前序原创 2021-08-30 21:59:59 · 317 阅读 · 0 评论 -
java刷题-动态规划
1.word-break原题链接:www.nowcoder.com题目描述:Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence ofone or more dictionary words.For exa...原创 2019-06-28 22:39:08 · 240 阅读 · 0 评论