data-structures
How to convert from recursive algorithm to iterative [closed]
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time,or an extraordinarily narrow situation that is not generally applic[详细]
2023-04-10 17:14 分类:问答Storing elements in an unordered_set vs storing them in an unordered_map
Suppose I have the following User struct: struct User { string userId; UserType userType; // UserType is just an enumeration[详细]
2023-04-10 16:15 分类:问答What data structure should I use for a simple synchronized LIFO?
What data structure should I use for a simple synchronized LIFO? I\'m using Android Java 1.6. The problem with Java collections is that there are millions开发者_如何学JAVA of slightly different classe[详细]
2023-04-10 11:38 分类:问答Optimal Binary Search Trees
I have an assignment on optimal binary search trees and some questions came up while doing it. I have found many of the links online helpful (just from a Google search) but I was wondering...[详细]
2023-04-10 10:41 分类:问答O(klogk) time algorithm to find kth smallest element from a binary heap
We have an n-node bi开发者_JAVA百科nary heap which contains n distinct items (smallest item at the root). For a k<=n, find a O(klogk) time algorithm to select kth smallest element from the heap.[详细]
2023-04-10 08:47 分类:问答Data structure for storing chord progression rules? [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing th[详细]
2023-04-10 08:35 分类:问答Why is mergesort better for linked lists?
Why is mergesort considered \"the way to go\" when sorting lists and not quicksort? I heard this in a lecture that I watched online, and saw it in a couple of w开发者_StackOverflow社区ebsites. One of[详细]
2023-04-10 08:14 分类:问答Data structure that supports the following in O(1) time: initialization, insertion, deletion, finding an element, deleting all elements
Interview Question: Propose a data structure that holds elements from 0 to n − 1 and supports all of the following operations in O(1) time: initialization, insertion of an element, deletion[详细]
2023-04-10 07:00 分类:问答QMap and QPair, C++, Qt
I want to make a data structure for accessing strings by two ways: Access by ID Access by name My first idea is using two maps for each method but it leads 开发者_运维技巧to duplication of data:[详细]
2023-04-10 05:41 分类:问答compact storage for non static binary trees
I have seen array based implementations of static binary trees which do not waste memory for pointers and instead do operations on the current index to go to its parent or children. Is there any artic[详细]
2023-04-10 04:52 分类:问答