自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(164)
  • 收藏
  • 关注

原创 LeetCode详细题解答案整理-java

LeetCode详细题解答案整理1Two Sum 两数之和Two Sum 两数之和EasyArray,HashTable7Reverse Integer 颠倒整数Reverse Integer 颠倒整数EasyMath9Palindrome Number 回文数Palindrome Number ...

2020-02-16 22:57:17 1564

原创 PMP模考(二)——错题集

PMP模考(二)——错题集

2023-03-16 21:30:19 3915

原创 PMP模考(一)——错题集

PMP模考(一)错题集

2023-03-13 21:07:24 4813

原创 PMP考前冲刺题——错题集

PMP考前冲刺题——错题集

2023-03-07 21:36:44 1903

原创 PMP敏捷专项练习题-错题整理

PMP敏捷专项练习题

2023-03-01 20:27:31 2416

原创 LeetCode 841. Keys and Rooms 钥匙和房间(Java)

LeetCode 841. Keys and Rooms 钥匙和房间(Java)

2022-07-02 16:10:59 346

原创 mjpg-stream测试框架运行与解读

文章目录mjpg-stream运行mjpg-stream运行cd mjpg-streamer/mjpg-streamermake clean allsudo make install./start.sh

2021-10-31 10:52:30 1021

原创 在Ubuntu下如何编译OpenHarmony3.0

主要参照OpenHarmony下的这篇文档:Ubuntu下的源码编译我们在上一篇文章中成功获取了OpenHarmony的源码,这篇文章我们将编译并烧录在Hi3516开发板上。首先在源码根目录下执行脚本,安装编译器及二进制工具。bash build/prebuilts_download.sh完成后,我们就可以在OpenHarmony同目录下,看到OpenHarmony_2.0_canary_prebuilts文件夹,存放刚刚下载的prebuilts二进制。安装设备数编译工具dtcsud

2021-10-26 09:12:55 1358

原创 Ubuntu环境下获取OpenHarmony源码

通过git指令查看是否安装git,如果没有安装,执行下面命令进行git安装sudo apt-get install git配置自己的名称和电子邮件地址git config --global user.name "xxx"git config --global user.email "你的邮箱地址"配置完成后,需要创建验证用的公钥sshssh-keygen -C 'you email address@gmail.com' -t rsa创建完成后,会在用户目录~/.ssh/下建立相应..

2021-10-20 16:27:43 1175

原创 Android 简易闹钟的实现

主要是通过广播,实现一个闹钟的简易功能。实现效果如下:主界面为一个简易的

2020-08-24 11:57:25 5347 16

原创 LeetCode 138. Copy List with Random Pointer 复制带随机指针的链表(Java)

题目:A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy of the list.The Linked List is represented in the input/output as a list of n nodes. Each node is re

2020-07-06 23:00:12 229

原创 Android Framework 基础理解

文章目录Android 四层框架Framework 基础理解服务端客户端Linux驱动Android 四层框架Android 经典的四层框架,其中包括:Application 应用程序层,Application Framework 应用程序框架层,Libraries 系统运行库层,Linux Kernel Linux核心层Application系统应用层Application Framework:为应用程序框架层。为应用层的开发者提供API各种服务。Libraries系统运行库层:可

2020-06-15 09:29:22 1174

原创 Java 多线程基础(黑马视频笔记)

文章目录线程实现方式线程的基本概念多线程的创建Thread 类Runnable 接口匿名内部类方式线程同步机制(线程安全问题)同步代码块同步方法静态同步方法Lock 锁线程状态Timed Waiting(计时等待)BLOCKED(锁阻塞)Waiting (无限等待)等待唤醒机制线程池Lambda 表达式线程实现方式线程的基本概念我们先学习两组概念。首先是并发与并行并发:指两个或多个事件在同一个时间段内发生并行:指两个或多个事件在同一时刻发生(同时发生)其次,进程和线程的区别是:进程:一

2020-05-19 00:27:51 1126

原创 Java中的异常及异常处理(黑马视频笔记)

异常与多线程异常异常概念异常:程序在执行过程中,出现非正常情况,导致JVM的非正常停止异常本身是一个类。产生异常就是创建异常对象并抛出了一个异常对象。Java处理异常的方式是:中断处理异常的父类是java.lang.Throwable,有两个子类:java.lang.Error:无法通过处理的错误,只能避免java.lang.Exception:编译期异常,处理后程序可继续执行。其...

2020-05-13 15:44:22 464

原创 Java中HashMap的底层实现原理

文章目录HashMap基本结构HashMap 实现存储与读取HashMap基本结构我们常见的两种数据结构:数组:数据存储地址连续。查询快,寻址容易。但是插入删除困难链表:数据散列存储。查询慢,但是增删快上述两个结构各有优缺,HashMap 就是将这两种结构进行结合,即采用数组+链表的形式,其中,每一个数组中的值存放的是一个Entry类,属性有key(键),value(值),next(下一个)。HashMap 是基于哈希表的 Map 接口的非同步实现。此实现提供所有可选的映射操作,并允许使用nul

2020-05-11 20:33:35 818

原创 LeetCode 137. Single Number II 只出现一次的数字(Java)

题目:Given a non-empty array of integers, every element appears three times except for one, which appears exactly once. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?E

2020-05-11 13:30:30 195

原创 LeetCode 134. Gas Station 加油站(Java)

题目:There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its next station (i+1). You begin the journey with an emp

2020-05-10 16:22:47 223

原创 LeetCode 133. Clone Graph 克隆图(Java)

题目:Given a reference of a node in a connected undirected graph.Return a deep copy (clone) of the graph.Each node in the graph contains a val (int) and a list (List[Node]) of its neighbors.class No...

2020-05-08 11:20:27 319

原创 LeetCode 131. Palindrome Partitioning 分割回文串(Java)

题目:Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.Example:Input: “aab”Output:[[“aa”,“b”],[“a”,“a”,“b...

2020-05-06 16:16:16 187

原创 LeetCode 130. Surrounded Regions 被围绕的区域(Java)

题目:Given a 2D board containing ‘X’ and ‘O’ (the letter O), capture all regions surrounded by ‘X’.A region is captured by flipping all 'O’s into 'X’s in that surrounded region.Example:X X X XX O ...

2020-05-06 11:29:16 246

原创 LeetCode 129. Sum Root to Leaf Numbers 根到叶子节点数字之和(Java)

题目:Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which represents the number 123.Find the to...

2020-05-05 16:37:58 190

原创 Java中的继承与多态(黑马视频笔记)

文章目录继承抽象类接口继承继承主要解决的问题是:共性抽取继承关系的特点:子类可以拥有父类的“内容”子类还可以拥有自己专有的内容在继承的关系中,“子类就是一个父类”。关系:is-a继承格式//定义父类的格式:(一个普通的类定义)public class 父类名称 { //......}// 定义子类的格式:public class 子类名称 extends 父类名称 {...

2020-04-28 20:13:00 422

原创 LeetCode 127. Word Ladder 单词接龙(Java)

题目:Given two words (beginWord and endWord), and a dictionary’s word list, find the length of shortest transformation sequence from beginWord to endWord, such that:Only one letter can be changed at ...

2020-04-28 20:09:16 222

原创 LeetCode 120. Triangle 三角形最小路径和(Java)

题目:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[ [2], [3,4], [6,...

2020-04-21 23:43:52 407

原创 LeetCode 117. Populating Next Right Pointers in Each Node II 填充每个节点的下一个右侧节点指针II(Java)

题目:Given a binary treestruct Node { int val; Node *left; Node *right; Node *next;}Populate each next pointer to point to its next right node. If there is no next right node, the next poin...

2020-04-21 21:14:28 226

原创 LeetCode116. Populating Next Right Pointers in Each Node 填充每个节点的下一个右侧节点指针(Java)

题目:You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following definition:struct Node { int val; Node *left;...

2020-04-20 21:38:27 192

原创 LeetCode 114. Flatten Binary Tree to Linked List 二叉树展开为链表(Java)

题目:Given a binary tree, flatten it to a linked list in-place.解答:本题主要是怎样在原地 将二叉树转换为链表我采用的思路如下:判断 root.left 是否为空,若不为空,则找到 temp 节点为左子树的最右节点将 root 的右子树连接到左子树的最右节点 temp将左子树连接为 root 的右子树,并将 root 左子...

2020-04-20 19:57:43 179

原创 LeetCode 113. Path Sum II 寻找二叉树路径总和II(Java)

题目:Given a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the given sum.Note: A leaf is a node with no children.解答:本题为 LeetCode 112 题的进阶版。通过 DFS 深度优先搜索,找到满足的路径。在这...

2020-04-17 17:50:50 210

原创 LeetCode 109. Convert Sorted List to Binary Search Tree 有序链表转换二叉搜索树(Java)

题目:Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.For this problem, a height-balanced binary tree is defined as a binary tree in which t...

2020-04-17 15:39:22 164

原创 106. Construct Binary Tree from Inorder and Postorder Traversal 根据中序、后序遍历序列构建二叉树(Java)

题目:Given inorder and postorder traversal of a tree, construct the binary tree.Note: You may assume that duplicates do not exist in the tree.解答:本题根据树的中序遍历和后序遍历,得到树的结构。与 LeetCode 105 思路基本一致整体思路为:...

2020-04-17 12:39:53 245

原创 105. Construct Binary Tree from Preorder and Inorder Traversal 根据前序、中序遍历序列构建二叉树(Java)

题目:Given preorder and inorder traversal of a tree, construct the binary tree.Note: You may assume that duplicates do not exist in the tree.解答:题目根据树的前序遍历和中序遍历,得到树的结构整体思路为:首先我们知道,前序遍历的第一个节点一定是根节点...

2020-04-17 12:13:33 232

原创 LeetCode 103. Binary Tree Zigzag Level Order Traversal 二叉树Z字形层级遍历(Java)

题目:Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to left for the next level and alternate between).解答:解法一:堆栈与 LeetCode 102...

2020-04-14 16:01:16 218

原创 LeetCode 102. Binary Tree Level Order Traversal 二叉树的层级遍历(Java)

题目:Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).解答:解法一:这道题为二叉树的层级遍历借助ArrayList,实现了层级遍历,具体思路为:创建 list,用于存储当前遍历层的节点创建 nex...

2020-04-14 13:33:23 149

原创 LeetCode 96. Unique Binary Search Trees 不同的二叉搜索树(Java)

题目:Given n, how many structurally unique BST’s (binary search trees) that store values 1 … n?解答:这道题与 LeetCode 95 题基本一致,但解法不相同。也是采用动态规划的思想,二叉搜索树的个数 = 左子树的个数 * 右子树的个数因此把问题换分为两个子问题,及求解当前根节点情况下,左子树与...

2020-04-13 22:14:43 140

原创 LeetCode 95. Unique Binary Search Trees II 不同的二叉搜索树II(Java)

题目:Given an integer n, generate all structurally unique BST’s (binary search trees) that store values 1 … n.解答:本题没有想到解题思路,所以采用了官方给的解法,通过递归实现,值得好好学习。首先二叉搜索树的特点是:左子树 < 根节点 < 右子树所以要找到 1-n 所有的...

2020-04-13 21:17:20 172

原创 LeetCode 94. Binary Tree Inorder Traversal 二叉树的中序遍历(Java)

题目:Given a binary tree, return the inorder traversal of its nodes’ values.Follow up: Recursive solution is trivial, could you do it iteratively?解答:二叉树的中序遍历,很基础的题目,递归方法比较简单,题目要求我们尝试用非递归的方式求解,则借助栈 ...

2020-04-09 16:10:49 167

原创 LeetCode 93. Restore IP Addresses 复原IP地址(Java)

题目:Given a string containing only digits, restore it by returning all possible valid IP address combinations.Example:Input: “25525511135”Output: [“255.255.11.135”, “255.255.111.35”]解答:这类问题基本采用...

2020-04-09 15:38:21 145

原创 LeetCode 92. Reverse Linked List II 反转链表II(Java)

题目:Reverse a linked list from position m to n. Do it in one-pass.Note: 1 ≤ m ≤ n ≤ length of list.Example:Input: 1->2->3->4->5->NULL, m = 2, n = 4Output: 1->4->3->2->5...

2020-04-08 17:13:06 217

原创 LeetCode 91. Decode Ways 解码方式(Java)

题目:A message containing letters from A-Z is being encoded to numbers using the following mapping:‘A’ -> 1‘B’ -> 2…‘Z’ -> 26Given a non-empty string containing only digits, determine t...

2020-04-08 13:46:20 213

原创 LeetCode 90. Subsets II 子集II(Java)

题目:Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.Example:Input: [1,2,2]...

2020-04-07 17:35:35 198

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除