![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
foxchopin
这个作者很懒,什么都没留下…
展开
-
动态规划 背包问题 C++
// main.cpp // DP程序 //这是一个动态规划来解决背包问题的程序 //本程序的实例和理论来源博客的链接为 http://blog.csdn.net/mu399/article/details/7722810 //http://blog.csdn.net/dapengbusi/article/details/7463968 // 初次编写 by肖邦 // Created by ...原创 2017-04-03 16:27:41 · 815 阅读 · 0 评论 -
寻找第k大的数
// // main.cpp //findk // // Created by Xiao Bang on 2017/6/28. // Copyright © 2017年 Xiao Bang. All rights reserved. // #include #include using namespace std; template const Comparable & media原创 2017-07-02 10:58:51 · 353 阅读 · 0 评论 -
Mac 操作积累笔记
sx10.11.1 上面sudo pip install ipython时出现的问题。f executing pip with sudo, you may want sudo's -H flag.原创 2017-08-21 22:28:57 · 243 阅读 · 0 评论 -
两个队列实现一个栈
两个队列实现一个栈: class Stack { private : queue q[2]; int current = 0; public : void Push(int data) { q[current].push(data); } int Pop() { int result = 0;原创 2017-12-14 22:00:58 · 182 阅读 · 0 评论 -
剑指offer(面试题50)树中两结点的最低公共祖先(C++实现)
#include #include using namespace std; struct TreeNode { int val; TreeNode * left; TreeNode * right; }; bool FindPath(TreeNode * root, TreeNode * pNode, vector & vec) { if (root =原创 2018-01-01 16:32:03 · 377 阅读 · 0 评论