自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(65)
  • 资源 (6)
  • 收藏
  • 关注

原创 [二分查找]

。。

2022-09-13 22:57:37 129 1

原创 【刷题】滑动窗口

。。。

2022-06-11 14:01:56 105

转载 AutocompleteSystem

Note:MANY DETAILS ARE MISSED:If less than 3, return as many as it. So it could be NPE when queue.poll().getKey()Use alphabetical order if times are same. So in the queu need to compare value first then compare string.Logically it needs to set chi

2021-08-11 23:21:37 71

原创 2021-06-20微软面试

package msinterview;public class CoinTransition {static int count = 0;public static void main(String[] args) {int[] coins = new int[] {1, 1, -1}; System.out.print(maxTransition(coins));}// 1是正面 -1是花static int maxTransition(int[] coins) { for (i

2021-06-20 12:36:02 99

原创 【刷题】leetcode 355. Design Twitter

public class Twitter { Map<Integer, Set<Integer>> fans = new HashMap<>(); Map<Integer, LinkedList<Tweet>> tweets = new HashMap<>(); int cnt = 0; public void postTweet(int userId, int tweetId) { i

2020-10-08 20:43:42 162

原创 【刷题】leetcode 113 path sum II

Example:Given the below binary tree and sum = 22, 5 / \4 8/ / 11 13 4/ \ / 7 2 5 1Return:[[5,4,11,2],[5,8,4,5]]/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; *

2020-10-08 15:12:53 74

原创 【刷题】leetcode 621 task schedule

Given a characters array tasks, representing the tasks a CPU needs to do, where each letter represents a different task. Tasks could be done in any order. Each task is done in one unit of time. For each unit of time, the CPU could complete either one task

2020-10-08 15:07:51 67

原创 【刷题】leetcode 763 partition labels

A string S of lowercase English letters is given. We want to partition this string into as many parts as possible so that each letter appears in at most one part, and return a list of integers representing the size of these parts.Example 1:Input: S = “ab

2020-10-08 15:02:44 84

原创 【刷题】Leetcode 394 decode string

用栈public class Solution { public String decodeString(String s) { String res = ""; Stack<Integer> countStack = new Stack<>(); Stack<String> resStack = new Stack<>(); int idx = 0; while (id

2020-10-08 14:59:04 57

原创 谷歌单体仓

在这里插入图片描述

2020-09-21 22:52:59 104

原创 minimum depth tree

class Solution {// 从叶子节点往上遍历,最终剩下的是结果public List findMinHeightTrees(int n, int[][] edges) {List res = new ArrayList<>();if (n == 1) {res.add(0);return res;}int[] degree = new int[n];Map<Integer, Set> map = new HashMap<>();for (i

2020-09-20 20:42:50 46

原创 [刷题]连续整数

15=1+2+3+4+515=4+5+615=7+81.如果输入n是奇数,那连续整数可以表示为:n = (n-1)/2 + (n+1)/22.如果输入n是偶数,分两种情况:情况1:n一直除以2,如果最终结果是奇数(最终不是1),那n可以是连续奇数组成情况2:n一直除以2,结果一直是偶数,那无法形成连续的奇数,即该数是2的n次方...

2020-08-03 15:18:51 290

原创 刷题:(0,0)到(i,j)最大值

题目:2 31 2 31 0 2最大值:8DP算法public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int row = sc.nextInt(); int column = sc.nextInt(); int[][] dpMat = new int[row][column]

2020-07-31 18:00:57 187

原创 【刷题】Leetcode 171. Excel Sheet Column Number

有一段时间没有刷题了,因为我已经拿到**菊厂**的offer啦! 回头看写的这些博客,都是对做过的的题的总结,代码规范,时间复杂度,注释等写的还可以更好一些。 我知道自己的总结和格式都*不够*到位和漂亮,没有特别认真的去书写,都是做完题草草的留下来了而已。 所以,今后还是会更多的总结,包括这一年左右国内大厂的面经,分享给可能和我一样拧巴一样努力奋进想要铁杵成针的童鞋。 今天写这道题,是因为这是道面试原题哦!A -> 1B -> 2C -> 3…Z...

2020-05-26 15:51:57 97

原创 【刷题】Leetcode 146. LRU Cache

class LRUCache { HashMap<Integer, Node> map; int capacity; int count; Node head; Node tail; public LRUCache(int capacity) { map = new HashMap<Integer, Node>...

2020-04-11 21:04:37 120

原创 【刷题】Leetcode 300. Longest Increasing Subsequence

3 10 1 8 5 6 9 4 dp[]: 1 2 1 2 2 3 4 2public class Solution { public int lengthOfLIS(int[] nums) { if (nums.length == 0) { return 0; } int[] dp =...

2020-03-24 19:55:54 59

原创 虚拟化和云计算

!](https://img-blog.csdnimg.cn/20200310174208355.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzE5NDUwOTIx,size_16,color_FFFFFF,t_70)

2020-03-10 17:43:22 100

原创 英语(from little sheldon)

beside herself 气疯了,着急be a good sport 有风度you have the floor 你可以说了bluff 唬人on the heels of 紧接着

2020-02-29 18:57:04 197

转载 spring容器实现

Spring容器的简单实现(IOC原理)引言:容器是什么?什么是容器?Spring容器又是啥东西?我给Spring容器一个对象名字,为啥能给我创建一个对象呢?一、容器是装东西的,就像你家的水缸,你吃饭的碗等等。 java中能作为容器的有很多,例如Map,List,数组.....还有好多二、Spring 容器的核心就是一个Map集合(可能不是很准确,见谅!)Map<String,...

2020-02-28 17:23:12 94

原创 你问我都学了啥

jvm: https://www.bilibili.com/video/av70166821/?spm_id_from=333.788.videocard.1mysql高级: https://www.bilibili.com/video/av68633494/?p=44&t=31spring: https://www.bilibili.com/video/av71252572?p=2...

2020-02-28 13:56:23 82

原创 计算机网络

广域网: https://www.bilibili.com/video/av40760446?from=search&seid=15674602669622404275socket编程:https://www.bilibili.com/video/av69214367?p=8局域网:https://www.bilibili.com/video/av9876107?p=2香农公式:ht...

2020-02-22 17:53:41 56

原创 计算机原理???

制作8位计算机:https://www.bilibili.com/video/av77065201?p=62计算机如何读取代码:https://www.bilibili.com/video/av62271485How a CPU works: https://www.bilibili.com/video/av9667986?from=search&seid=1517593687...

2020-02-22 17:50:23 99

原创 【转花花】并查集

这里插入图片描述

2020-02-10 12:51:33 66

原创 [转自花花]fenwick tree

2020-02-10 12:42:44 114

原创 93. Restore IP Addresses

Example:Input: “25525511135”Output: [“255.255.11.135”, “255.255.111.35”]class Solution { public List<String> restoreIpAddresses(String s) { List<String> list = new ArrayList();...

2019-12-25 15:23:17 46

原创 19. Remove Nth Node From End of List

/**Definition for singly-linked list.public class ListNode {int val;ListNode next;ListNode(int x) { val = x; }}*/class Solution {public ListNode removeNthFromEnd(ListNode head,...

2019-12-25 15:22:33 43

原创 牛客网 华为编程

Leetcode 37class Solution { public void solveSudoku(char[][] board) { if(board.length == 0 || board == null) return; helper(board, 0); } public boolean helper(...

2019-12-22 11:57:30 80

原创 【刷题】Leetcode 347. Top K Frequent Elements

Given a non-empty array of integers, return the k most frequent elements.Example 1:Input: nums = [1,1,1,2,2,3], k = 2Output: [1,2]Example 2:Input: nums = [1], k = 1Output: [1]class Solution { ...

2019-12-18 19:16:49 87

原创 【刷题】Leetcode 746. Min Cost Climbing Stairs

On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed).Once you pay the cost, you can either climb one or two steps. You need to find minimum cost to reach the top of t...

2019-12-09 15:55:11 50

原创 【刷题】Leetcode 494. Target Sum

Example 1:Input: nums is [1, 1, 1, 1, 1], S is 3.Output: 5Explanation:-1+1+1+1+1 = 3+1-1+1+1+1 = 3+1+1-1+1+1 = 3+1+1+1-1+1 = 3+1+1+1+1-1 = 3There are 5 ways to assign symbols to make the sum ...

2019-12-08 18:51:08 42

原创 【刷题】Leetcode 459. Repeated Substring Pattern

Example 1:Input: “abab”Output: TrueExplanation: It’s the substring “ab” twice.Example 2:Input: “aba”Output: False暴力法:public boolean repeatedSubstringPattern(String str) { int l = str.length()...

2019-12-06 16:04:18 112

原创 【刷题】Leetcode 862. Shortest Subarray with Sum at Least K

暴力解class Solution { public int shortestSubarray(int[] A, int K) { int[] P = new int[A.length + 1]; for(int i = 0; i < A.length; i++){ P[i + 1] = P[i] + A[i]; ...

2019-12-05 19:53:04 56

原创 【刷题】Leetcode 212. Word Search II

Example:Input:board = [[‘o’,‘a’,‘a’,‘n’],[‘e’,‘t’,‘a’,‘e’],[‘i’,‘h’,‘k’,‘r’],[‘i’,‘f’,‘l’,‘v’]]words = [“oath”,“pea”,“eat”,“rain”]Output: [“eat”,“oath”]避免有相同前缀的词重复查找比如“aaaaaax”, “aaaaaay” 所以...

2019-11-25 23:24:25 79

原创 【刷题】Leetcode 208. Implement Trie (Prefix Tree)

class TreeNode { char val; TreeNode[] next; boolean isEnd; public TreeNode(){ this.next = new TreeNode[26]; }}class Trie { public TreeNode root; /** Initialize ...

2019-11-25 19:23:22 77

原创 【刷题】Leetcode 341. Flatten Nested List Iterator

Example 1:Input: [[1,1],2,[1,1]]Output: [1,1,2,1,1]Explanation: By calling next repeatedly until hasNext returns false,the order of elements returned by next should be: [1,1,2,1,1].Example 2:Inp...

2019-11-25 09:50:15 129

原创 【刷题】Leetcode 236. Lowest Common Ancestor of a Binary Tree

/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */class Solution { Tr...

2019-11-24 23:06:40 74

原创 【刷题】Leetcode 10. Regular Expression Matching

‘.’ Matches any single character.‘*’ Matches zero or more of the preceding element.Example 1:Input:s = “aa”p = “a”Output: falseExplanation: “a” does not match the entire string “aa”.Example 2:...

2019-11-24 22:00:57 47

原创 【刷题】Leetcode 207. Course Schedule

There are a total of n courses you have to take, labeled from 0 to n-1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pair:...

2019-11-20 16:15:45 57

原创 【刷题】Leetcode 91. Decode Ways

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 the tot...

2019-11-19 14:15:08 76

原创 【刷题】Leetcode 148. Sort List

Example 1:Input: 4->2->1->3Output: 1->2->3->4/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { va...

2019-11-19 12:55:05 49

52001CC1C8 Java 实践17-18-3.zip

图书管理项目,jdbc。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

2020-03-06

安卓课上项目集合1.zip

安卓的一堆优秀项目,大作业,单元项目,课程项目等。记事本,备忘录,点餐,音乐,咖啡商城,书库,电影等等。

2020-03-06

zuoyexitong .zip

在线作业系统,实现题目添加,上传,考试出分,查询成绩,管理员登陆,题库添加等操作。便于实现在线教学,信息化管理,检测学生学习状态和成绩。利用SSM框架,mysql数据库实现后台系统。

2020-03-06

基于matlab的车牌识别

车牌照识别是图像识别领域的重要研究课题。运用MATLAB对车牌识别技术中的图像预处理、车牌定位、字符分割与字符识别等进行了研究,提出了一种基于MATLAB的车牌识别系统的实现方法

2016-02-17

基于android的二维码识别系统研究与实现

研究了QR码结构的基本特征、编解码理论、RS纠错算法和二维码图像预处理算法,然后在当前预处理算法的基础上,基于QR码图像的特点,进行程序的编写。

2016-02-17

空空如也

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

TA关注的人

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