蝉沐风~
蝉沐风~
全部文章
分类
C(1)
centos(1)
firefox(1)
golang(3)
html(1)
http协议(1)
javascript(1)
json(1)
leetcode(5)
linux(2)
NP(1)
内网(1)
存储(1)
排序(1)
数据结构(1)
未归档(42)
正则表达式(1)
算法++(14)
递归(1)
归档
标签
去牛客网
登录
/
注册
蝉沐风~的博客
TA的专栏
1篇文章
0人订阅
图解MySQL
1篇文章
446人学习
全部文章
(共80篇)
218. The Skyline Problem
package com.chanmufeng.questions; import java.util.*; public class Skyline { public static class Node { public int pos; public in...
2018-11-24
0
660
二叉树的非递归遍历
import java.util.Stack; public class PreOrder { public static class Node { public int value; public Node left; public Nod...
2018-11-20
0
457
数组heapify变为堆结构
public class Heapify { public static void heapify(int[] arr) { int length = arr.length; for (int i = (length - 1) / 2; i >= 0;...
2018-11-19
0
438
获取数组中前K小的数字
public class GetMinKNums { //向堆中插入元素 public static void insert(int[] arr, int index, int value) { arr[index] = value; while (i...
2018-11-19
0
453
75. Sort Colors
方法1:快速排序的partition思想 class Solution { public void sortColors(int[] nums) { int l = 0; int r = nums.length-1; int cur = l;...
2018-11-16
0
498
一文读懂KMP算法
KMP算法用来解决什么问题 KMP算法是由D.E.Knuth、J.H.Morris和V.R.Pratt同时发现的,因此该算法以三位作者的名字缩写而成 KMP用来解决的问题是:给定一个由n个字符构成的文本,一个由m(m<=n)个字符构成的字串,从文本中寻找给定子串,如果子串存在,则返回文本中第...
2018-11-15
0
488
402. Remove K Digits
faster than 88.79% of Java online submissions for Remove K Digits. public class Solution { public String removeKdigits(String num, int k) { ...
2018-11-13
0
454
实现带有返回栈中最小元素功能的栈结构
实现一个特殊的栈,在实现栈的基本功能的基础上,再实现返 回栈中最小元素的操作 要求:pop、push、getMin操作的时间复杂度都是O(1) 版本1 package com.chanmufeng.codingInterviewGuide; import java.util.Stack; ...
2018-11-03
0
401
使用固定长度的数组实现队列
/** * 固定长度数组实现队列 */ public class ArrayQueue { private int[] data; private int start; private int end; private int size; public ...
2018-11-02
0
867
使用固定大小的数组实现栈结构
/** * 使用数组实现固定大小的栈结构 */ public class ArrayStack { private int[] data; private int index; public ArrayStack(int capacity){ if (c...
2018-11-02
0
481
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页