
刷题之路
Coder567
C++、Golang、nginx、openresty学习中,欢迎交流,共同进步!
展开
-
LRU算法C++实现
使用unordered_map 和 双向链表简单实现的LRU算法 #include <iostream> #include <unordered_map> using namespace std; struct CacheNode { int key; int value; CacheNode *pre, *next; CacheNode(int k, int v) : key(k), value(v), pre(nullptr), next(nullptr) {}原创 2021-03-21 14:00:52 · 563 阅读 · 0 评论 -
PAT 1003 Emergency (Dijkstra算法 ) 示例解析
As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the length of each road between any pair of cities are marked原创 2020-09-01 22:31:42 · 270 阅读 · 0 评论 -
归并排序及相关变形问题(逆序对)总结(C++版)
1.归并排序 测试网址:https://www.nowcoder.com/practice/508f66c6c93d4191ab25151066cb50ef?tpId=69&&tqId=29657&rp=1&ru=/activity/oj&qru=/ta/hust-kaoyan/question-ranking #include<iostream...原创 2018-10-29 10:52:09 · 366 阅读 · 0 评论