自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 java多线程总结

1 - 进程1.1 -进程进程就是正在运行的程序,(进程是驻留在内存当中的)是系统分配资源的最小单位每个进程都有自己的存储空间和系统资源1.2 -线程线程就是进程中的单个顺路控制流,可以理解是一条执行路径单线程:一个进程中包含一个顺序控制流(一条执行路径)多线程:一个进程中包含多个控制流(多条执行路径)1.3 - 多线程的实现1、继承Thread类,重写run()方法class MyThread extends Thread { @Override pu

2021-11-15 16:24:45 552

原创 七大排序算法

1、冒泡排序在无序区间,通过相邻数的比较,将最大的数冒泡到无序区间的最后,持续这个过程,直到数组整体有序。

2021-08-28 17:58:27 83

原创 c++编程练习(3)

c++编程练习

2023-02-01 21:57:19 148 1

原创 c++编程练习(2)

c++编程练习

2023-01-05 22:25:45 144

原创 c++之编程练习(1)

c++之编程练习(1)

2022-12-09 16:21:53 199

原创 Qt绘图机制

Qt绘图机制

2022-12-04 14:01:47 412

原创 Qt中的事件

Qt中的事件

2022-11-21 11:39:27 337

原创 Qt常用控件

Qt常用控件

2022-11-08 22:38:23 1089

原创 QT学习---QMainWindow

QT学习---QMainWindow

2022-10-24 22:40:48 1259 1

原创 初始QT学习

初始Qt学习

2022-10-20 22:01:40 212

原创 c++中的链表list

c++中的链表list

2022-10-08 17:30:50 276

原创 c++中的deque容器和queue容器

c++中的deque容器和queue容器

2022-09-30 15:05:35 847

原创 c++中的string和vector

c++中的string和vector

2022-09-20 17:35:35 1042

原创 c++类型转换和异常

c++

2022-09-13 23:20:55 346

原创 c++函数模板

C++模板函数和模板类

2022-09-09 14:10:45 368

原创 c++中的继承

c++ 的继承

2022-09-02 11:43:16 655 1

原创 c++中的重载

c++重载

2022-08-27 16:02:13 331

原创 c++中的友元函数

友元

2022-08-19 17:23:53 438

原创 c++对类的的详解(2)

c++类的详解2

2022-08-16 17:23:56 481

原创 C++中的类详解(1)

c++类的学习

2022-08-07 21:47:09 773 1

原创 C++的对C的扩展(1)

C++基础学习

2022-07-28 22:04:23 245

原创 剑指offer专项突击版 ---- 第 6 天

class Solution { public String minWindow(String s, String t) { int n = s.length(),m = t.length(); if(n<m) return ""; int[] cnt = new int[150]; int k = 0; for(char c:t.toCharArray()){ if(++cnt[c]==.

2022-01-13 18:12:52 79

原创 剑指offer专项突击版 ---第 5 天

class Solution { public boolean checkInclusion(String s1, String s2) { int m = s1.length(); int n = s2.length(); if(m > n){ return false; } int[] arr1 = new int[26]; int[] arr2 = new int[2.

2022-01-03 23:07:53 257

原创 剑指offer专项突击版 --- 第 4 天

class Solution { public int subarraySum(int[] nums, int k) { Map<Integer,Integer> map = new HashMap<>(); map.put(0, 1); int sum = 0; int count = 0; for (int i=0;i<nums.length;++i) { su.

2021-12-27 18:54:30 148

原创 剑指offer专项突击版 --- 第 3 天

class Solution { public List<List<Integer>> threeSum(int[] nums) { List<List<Integer>> ans = new ArrayList<>(); Arrays.sort(nums); for(int i = 0; i < nums.length - 2; i++){ if(nums[i.

2021-12-26 21:25:20 230

原创 剑指offer专项突击版 ---- 第2天

class Solution { public int singleNumber(int[] nums) { int ans = 0; for(int i = 0; i < 32; i++){ int target = 0; for(int num : nums){ target += (num >> i) & 1; } .

2021-12-24 20:21:32 332

原创 剑指offer专项突击版 ---- 第1天

class Solution { public int divide(int a, int b) { if(a == Integer.MIN_VALUE && b == -1){ return Integer.MAX_VALUE; } boolean flag = false; if((a>0 && b > 0) || (a < 0 && b &.

2021-12-21 13:20:55 137

原创 剑指offer基础版 ----第31天

class Solution { public int cuttingRope(int n) { if(n <= 3) return n - 1; int b = n % 3, p = 1000000007; long ret = 1; int lineNums=n/3; //线段被我们分成以3为大小的小线段个数 for(int i=1;i<lineNums;i.

2021-12-17 21:08:50 70

原创 剑指offer基础版--- 第23天

class Solution { public int majorityElement(int[] nums) { Arrays.sort(nums); return nums[nums.length / 2]; }}class Solution { public int[] constructArr(int[] a) { int len = a.length; if(len == 0) return new .

2021-12-15 21:55:31 440

原创 数据库学习笔记

一、数据库基础知识1.1、SQL,db,dbms之间的关系?sql:结构化查询语言,是一门标准通用的语言。标准的sql适合于所有的数据库产品DB:数据库DBMS:数据库管理系统DBMS负责执行sql语句,通过执行sql语句操作DB中的数据1.2、什么是表?表:table表:table是数据库的基板组成单元,所有数据都已表哥的形式组织,目的是可读性强一个表包括行和列:行:被称为数据/记录(data)列:被称为字段(column)每一个字段应该包括那些属性?字段名、数据类型、相关的约

2021-12-15 20:38:28 873

原创 剑指offer基础版 ---- 第29天

class Solution { public boolean isMatch(String s, String p) { int m = s.length(); int n = p.length(); boolean[][] f = new boolean[m + 1][n + 1]; f[0][0] = true; for (int i = 0; i <= m; ++i) { for.

2021-12-15 19:18:42 470

原创 剑指offer基础版 ----- 第28天

/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public class Codec { public String serialize(TreeNode root) { return.

2021-12-14 18:25:48 60

原创 剑指offer基础版 ---- 第27天

class Solution { public int[] maxSlidingWindow(int[] nums, int k) { if(nums.length == 0 || k == 0) return new int[0]; Deque<Integer> deque = new LinkedList<>(); int[] res = new int[nums.length - k + 1]; for(.

2021-12-08 22:24:55 68

原创 剑指offer基础版 ---- 第26天

class Solution { public int strToInt(String str) { char[] arr = str.trim().toCharArray(); if(arr.length == 0){ return 0; } int i = 1; int sign = 1; long res = 0; int sum = Integer.MA.

2021-12-07 14:16:41 67

原创 剑指offer基础版 ----- 第25天

class Solution { public int[] spiralOrder(int[][] matrix) { if(matrix.length == 0){ return new int[0]; } int[] arr = new int[matrix.length * matrix[0].length]; List<Integer> list= new ArrayList<>.

2021-12-06 21:58:41 54

原创 剑指offer基础版 --- 第24天

class Solution { public int cuttingRope(int n) { int[] dp = new int[n + 1]; dp[2] = 1; for(int i = 3; i <= n; i++){ for(int j = 2; j < i; j++){ dp[i] = Math.max(dp[i],Math.max(j * (i - j),j * d.

2021-12-05 21:07:08 59

原创 剑指offer基础版 --- 第22天

class Solution { public int[] singleNumbers(int[] nums) { int ret = 0; for(int num : nums){ ret = ret ^ num; } int target = 1; while((target & ret) == 0){ target = target << 1;.

2021-12-05 16:42:29 56

原创 剑指offer基础版 --- 第21天

public class Solution { // you need to treat n as an unsigned value public int hammingWeight(int n) { int x = 0; while(n != 0){ if((n & 1) == 1){ x++; n = n >>> 1; .

2021-12-03 13:55:40 55

原创 剑指offer基础版----第20天

class Solution { private Map<Integer, Integer> indexMap; public TreeNode myBuildTree(int[] preorder, int[] inorder, int preorder_left, int preorder_right, int inorder_left, int inorder_right) { if (preorder_left > preorder_right).

2021-12-02 21:39:16 62

原创 剑指offer基础版---第19天

class Solution { public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) { if(root == null){ return null; } if(root == p || root == q){ return root; } TreeNode left = .

2021-12-01 12:59:43 3333

空空如也

空空如也

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

TA关注的人

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