Category "language-agnostic"

Being Idiomatic in code vs Dogmatic and why the distinction is important

After we finished the final in one of my C++ courses, there was one more optional lecture given (obviously the final was already done so most people didn't go),

Where is the Balance Between Dependency Injection and Abstraction?

Many Architects and Engineers recommend Dependency Injection and other Inversion of Control patterns as a way to improve the testability of your code. There's n

String comparison time complexity

Which comparison would take longer time? a = helloworldhelloworldhelloworldb = https://www.somerandomurls.com/directory/anotherdirectory/helloworld.htmlif a !=

Converting words to numbers

I have problem converting words into numbers like Input: Five Thousand Six Hundred Thirty two Output: 5632 How can I do this?

Heap's algorithm for permutations

I'm preparing for interviews and I'm trying to memorize Heap's algorithm: procedure generate(n : integer, A : array of any): if n = 1 then output

URL safe UUIDs in the smallest number of characters

Ideally I would want something like example.com/resources/äFg4вNгё5, minimum number of visible characters, never mind that they have to b

Line of intersection between two planes

How can I find the line of intersection between two planes? I know the mathematics idea, and I did the cross product between the the planes normal vectors bu

Algorithm for finding the fewest rectangles to cover a set of rectangles without overlapping

I have a set of rectangles and I would like to "reduce" the set so I have the fewest number of rectangles to describe the same area as the original set. If poss

Longest path on a grid, without revisiting grid cells

I am looking for an algorithm to fidn the longest path between two points on a grid, with the added restriction that you cannot revisit a cell on the grid. (Als

Can hash tables really be O(1)?

It seems to be common knowledge that hash tables can achieve O(1), but that has never made sense to me. Can someone please explain it? Here are two situations

Can hash tables really be O(1)?

It seems to be common knowledge that hash tables can achieve O(1), but that has never made sense to me. Can someone please explain it? Here are two situations