Tag: language-agnostic

57 votes
6 answers
2.2K views
How do I determine whether my calculation of pi is accurate?

I was trying various methods to implement a program that gives the digits of pi sequentially. I tried the Tayl

avatar
Hilario
0 1 0 9
asked 07 September, 2021
61 votes
28 answers
1.6K views
Understanding "randomness"

I can't get my head around this, which is more random? rand() OR: rand() * rand() I´m finding it a

avatar
Thurman
0 1 0 9
asked 07 September, 2021
56 votes
30 answers
436 views
Determine Whether Two Date Ranges Overlap

Given two date ranges, what is the simplest or most efficient way to determine whether the two date ranges ove

avatar
Juliane
0 1 0 9
asked 07 September, 2021
61 votes
30 answers
1.4K views
Is floating point math broken?

Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004

avatar
Dwain
0 1 0 9
asked 07 September, 2021
50 votes
30 answers
2.9K views
Array versus linked-list

Why would someone want to use a linked-list over an array? Coding a linked-list is, no doubt, a bit more work

avatar
Chaya
0 1 0 9
asked 07 September, 2021
61 votes
12 answers
455 views
What is the difference between a map and a dictionary?

I know a map is a data structure that maps keys to values. Isn't a dictionary the same? What is the diffe

avatar
Thurman
0 1 0 9
asked 07 September, 2021
54 votes
7 answers
1.9K views
Skip List vs. Binary Search Tree

I recently came across the data structure known as a skip list. It seems to have very similar behavior to a bi

avatar
Jeff
0 1 0 9
asked 07 September, 2021
60 votes
16 answers
2.4K views
Why should hash functions use a prime number modulus?

A long time ago, I bought a data structures book off the bargain table for $1.25. In it, the explanation for

avatar
Hilario
0 1 0 9
asked 07 September, 2021
59 votes
7 answers
2.1K views
Ukkonen's suffix tree algorithm in plain English

I feel a bit thick at this point. I've spent days trying to fully wrap my head around suffix tree constru

avatar
Wilber
0 1 0 9
asked 07 September, 2021