WadeGao
WadeGao
全部文章
分类
C++(4)
Hash(2)
Huawei(4)
LeetCode(48)
PTA(10)
SQL(1)
剑指Offer(2)
动态规划(1)
堆(1)
嵌入式(3)
服务器(1)
未归档(3)
栈(1)
树(2)
考试(6)
计算机组成原理(2)
递归(2)
链表(2)
归档
标签
去牛客网
登录
/
注册
Wades NoteBook
这个人很懒,什么也没写。
TA的专栏
0篇文章
0人订阅
Wades NoteBook
0篇文章
0人学习
全部文章
(共95篇)
PTA数据结构与算法题目集(中文)6-2:顺序表操作集
一、题目描述 #include <stdio.h> #include <stdlib.h> #define MAXSIZE 5 #define ERROR -1 typedef enum { false, true} bool; typedef int Elem...
2020-09-24
0
455
LeetCode-184:部门工资最高的员工
SELECT d.Name as Department, e.Name as Employee, e.Salary FROM Employee e, Department d WHERE e.DepartmentID = d.Id AND (e.Salary, e.DepartmentID) IN ...
2020-09-24
0
410
PTA数据结构与算法题目集(中文)-6-7: 在一个数组中实现两个堆栈
一、题目描述 本题要求在一个数组中实现两个堆栈。 函数接口定义: Stack CreateStack( int MaxSize ); bool Push( Stack S, ElementType X, int Tag ); ElementType Pop( Stack S, int Tag ...
2020-09-24
0
901
LeetCode-146:LRU缓存机制
一、题目描述 二、解题思路 先来看一下什么是 L R U LRU LRU缓存机制,假设只给一个进程分配三个页框,当发生缺页的时候, O S OS OS必须选择一个页面将其换出其所在的页框,这个被选择的页面,将是在现有页框中最久没有被使用过的那个。就拿下面这张图为例: 比如我们现在处...
2020-09-24
0
415
LeetCode面试题 16.02: 单词频率
First. Problem’s Description Second. Problem’s Solution We can simply use a unordered_map to solve this problem, which core is powered by Hash By ...
2020-09-24
0
413
LeetCode面试题 03.01: 三合一
First. Problem’s Description Second. Problem’s Solution I don’t think there is any point that’s difficult to solve. Three. Code For Solution cla...
2020-09-24
0
370
LeetCode-173: 二叉搜索树迭代器
First. Problem’s Description Second. Problem’s Solution BST has a non-decreasing inorder-traversing series. We can use a list to store the nodes a...
2020-09-24
0
431
LeetCode-297: 二叉树的序列化与反序列化
一、题目描述 二、解题思路 这就是自己实现LeetCode输入输出二叉树的方法 对应给定的序列化二叉树字符串,需要知道这个字符串是二叉树层次遍历的结果 需要从字符串里得到各个节点元素值,将其保存到vector内,需要手动实现: split方法 to_integer...
2020-09-24
0
500
详解堆排序
一、什么是堆 堆是一种拥有一下性质的完全二叉树——子节点的值总是大于(或小于)父节点的值 堆又可以分为大顶堆和小顶堆: 大顶堆:父节点的值永远大于其子节点的值,其中根节点的值最大 小顶堆:父节点的值永远小于其子节点的值,其中根节点的值最小 下面来看两个例子: 二、堆排序 所谓...
2020-09-24
0
443
LeetCode-1048:最长字符串链
一、题目描述 二、解题思路 这个提示很重要,它限定了字符串的最大长度 题目里并没有说字符串的长度是递增的,有可能是乱序长度排列的,而我的一次错误提交也证实了这一猜想。 那么首先我们应该将字符串按照长度进行聚类,注意这里会用到1 <= words[i].length <= 16这个...
2020-09-24
0
713
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页