摘要:
template<typename T> class BoundedBlockingQueue { public: // make class non-copyable BoundedBlockingQueue(const BoundedBlockingQueue<T>&) = delete; Bo 阅读全文
摘要:
二分法查找循环有序数组中的某一元素,如果存在返回该值,否则返回 -1。int getNumFromLooOrderArray(int arr[], int target, int left, int right) { while (left < right) { int mid = left + ( 阅读全文
摘要:
https://leetcode-cn.com/problems/coin-change/ class Solution { public: //index 是index及其后面的硬币随便选 int process1(vector<int>& coins, int index,int amount) 阅读全文
摘要:
class Solution { public: int largestRectangleArea(vector<int>& heights) { if(heights.size()==0) return 0; stack<int>st; int res=-1; int len=heights.si 阅读全文