摘要:
##固定窗口 int numOfSubarrays(int* arr, int arrSize, int k, int threshold) { int sum = 0, ret = 0; threshold *= k; for(int i = 0; i < k; ++i) { sum += arr 阅读全文
摘要:
##Problem Description Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. class MinStack { public: //Cre 阅读全文
摘要:
##vector is a dynamic array When we want to use vector,we should write this #include We can add and delete element at the tail of vector by using func 阅读全文
摘要:
This problem let us remove linked list elements. Problem description: Given the head of a linked list and an integer val, remove all the nodes of the 阅读全文
摘要:
This problem let us reverse linked list. Problem description: Given the head of a singly linked list, reverse the list, and return the reversed list. 阅读全文