computer-science
Data structure for large ranges of consecutive integers?
Suppose you have a large range of consecutive integers in memory, each of which belongs to exactly one category. Two operations must be O(log n): moving a range from one category to another, and findi[详细]
2023-04-11 02:28 分类:问答OOP AP CS Practice
I am studying for the AP CS Exam, and came across this practice problem in the OOP section of my book.[详细]
2023-04-10 07:45 分类:问答Language Oriented Programming Articles/Papers/Tutorials
There is number of tools on the market like MPS, that promote Language Oriented Programming, which supposedly gives ability to programmer to design a 开发者_如何学JAVA(ideal?)language for task. This s[详细]
2023-04-09 10:46 分类:问答Proving Fibonacci recursive algorithm time complexity
I am trying to understand a proof by induction in my algorithms text book. Here\'s the author is proving using induction that the T(n) will always be greater than 2^(n/2) (This is for calculating the[详细]
2023-04-09 06:28 分类:问答Calculating Reciprocals: n**(-1) or (1/n)?
In random.py\'s source code, there is the following constant definition: BPF = 53# Number of bits in a float[详细]
2023-04-07 21:29 分类:问答Fixed point vs Floating point number
I just can\'t understand fixed point and floating point numbers due to hard to开发者_StackOverflow read definitions about them all over Google. But none that I have read provide a simple enough explan[详细]
2023-04-07 13:21 分类:问答Run-Times: Bounds vs Case
Note: Please do not tag this as homework! I am not a student and this is not an assignment. I am a software engineer dusting off my old Data Structures & Algorithms textbook and trying to remember[详细]
2023-04-06 07:15 分类:问答Hashes: Tables, Lists and Maps, Oh My?
I\'ve been trying to find some concrete (laymen; non super-academic) definitions for the various types of hash data structures, specifically hash tables, hash lists and hash maps. Online searches prov[详细]
2023-04-05 18:12 分类:问答Why is large integer division faster than slicing (numeric) strings, for accessing individual digits?
I am doing a (typical) assignment of finding primes. I thought I\'d be clever and, for large numbers, skip the division process with this trick:[详细]
2023-04-05 18:09 分类:问答Instance of subset sum problem
I have a problem which is a pretty clear instance of the subset sum开发者_StackOverflow problem: \"given a list of Integers in the range [-65000,65000], the function returns true if any subset of the[详细]
2023-04-04 22:34 分类:问答