space-complexity
Tutorial on space complexity of algorithms [duplicate]
This question already has answers here: Closed 11 years ago. Possible Duplicate: Plain English explanation of Big O[详细]
2023-04-02 18:03 分类:问答Relation of time complexity and space complexity
Can an algorithm having a time complexity of O(n) have a space complexity of O(n2) or more tha开发者_如何学Pythonn that?The space complexity cannot be more than the time complexity because writing X u[详细]
2023-03-29 17:15 分类:问答Reversing a singly linked list when a block size is given
There is a singly connected linked list and a block size is given.For eg if my linked list is 1->2->3->4->5->6->7->8-NULL and my block size is 4 then reverse the first 4 elements[详细]
2023-03-26 22:10 分类:问答merge sort space
In a top-down merge sortthe recursive functions are called in this fashion: void mergesort(Item a[], int l, int r) {[详细]
2023-03-26 04:30 分类:问答Find Kth largest number in single pass without storing the whole array
The algo I have in mind is keep an MaxHeap of size K insert each element drop out smaller value if heap is full[详细]
2023-03-15 05:26 分类:问答Big O complexities of algorithms - LZW and Huffman
What are the space an开发者_运维问答d time complexities, in Big O notation, for the Lempel-Ziv-Welch and Huffman compression algorithms? Google is failing me.[详细]
2023-03-09 18:28 分类:问答Finding contiguous ranges in arrays
You are given an array of integers. You have to output the largest range so that all numbers in the range are present in the array. The numbers might be present in any order.For example, suppose that[详细]
2023-02-19 04:23 分类:问答Breadth-First Directory Traversal: Is it possible with O(log n) memory?
I\'m trying to make an iterator that performs breadth-first traversal of all the files and folders inside a particular folder. I\'ve already done this with depth-first traversal, which returns, for ex[详细]
2023-02-16 21:28 分类:问答Bloom Filter Implementation
Using Bloom filter, w开发者_运维问答e will be getting space optimization. The cassandra framework also has an implementation of Bloom Filter. But in detail, how is this space optimization achieved?You[详细]
2023-02-01 17:50 分类:问答Big-O Space requirement for multiplication
Stack Overflow.I see some great resources on time complexity here, but so far I haven\'t been able to answer to this space complexity question using them.So:[详细]
2023-01-29 23:18 分类:问答