Skip to main content

Questions tagged [comparative-review]

This tag is used for questions which present a problem and multiple solutions, where the asker wishes to know which solution is best (and why).

3 votes
2 answers
176 views

Between the two implementations, which one is better? ...
Florian F's user avatar
  • 526
1 vote
1 answer
70 views

Intro This time, I present two maximum flow algorithms: Edmonds Karp algorithm, Relabel-to-front. (The entire repository with unit tests and more may be found here.) Code ...
coderodde's user avatar
  • 33.9k
3 votes
2 answers
236 views

This post presents two algorithms for computing determinants in square matrices. My code follows. Code io.github.coderodde.determinant.LongSquareMatrix.java: ...
coderodde's user avatar
  • 33.9k
12 votes
5 answers
2k views

I have just finished the 'camel' task of CS50 Introduction to Programming with Python where you have to convert camelCase to snake_case. After, I like to look online and compare my code to others to ...
Phoebe_B56's user avatar
5 votes
1 answer
55 views

I'm building a trading backtesting system in R where I need to determine whether a Stop Loss (SL) or Take Profit (TP) is hit first for each trade. If both are hit in the same bar, SL wins the tie. I ...
Phil's user avatar
  • 151
7 votes
4 answers
523 views

I'm implementing a MinMaxStack<T> in C++20 that tracks minimum and maximum values. The class needs T to support ...
sam's user avatar
  • 525
2 votes
2 answers
272 views

Intro A sort is called super linearithmic if its running time is \$\omega(N \log N)\$. For example, \$f(N) = \omega(g(N))\$ means that \$f(N)\$ grows "faster" than \$g(N)\$. In this post, I ...
coderodde's user avatar
  • 33.9k
0 votes
1 answer
196 views

What I'm asking here is whether do you think the facts there is no type enforcing; there is no indentation enforcing consoles do not syntax highlight consoles do not emphasize multi-line input a-la ...
Scrooge McDuck's user avatar
1 vote
0 answers
52 views

There are two versions of the CSV parser. The latter seems to be more performant than the former, although the former's code is easier to read. Variant 1, which parses a string: ...
Aleksei Tirman's user avatar
0 votes
1 answer
142 views

I'm doing some mini projects for my club related to fundamental optimization and am having a bit of trouble with this issue. There are N employees numbered 1, 2, ..., N who need to be scheduled for ...
trungbk's user avatar
  • 17
1 vote
2 answers
158 views

I have a function in an embedded system which translates an image encoded in a 32-bit integer to 3x9 matrix (an array of arrays): ...
Simson's user avatar
  • 337
9 votes
2 answers
580 views

LRU cache is a classical design pattern frequently questioned in programming technical interviews. It is best illustrated with pictures. Here are two examples. The following are two alternative ...
bobeff's user avatar
  • 190
7 votes
5 answers
932 views

Given ...
友人A's user avatar
  • 273
7 votes
2 answers
755 views

I have some API code that I need to rewrite. The original API is written in C++ and relies heavily on templates and modern C++ features like std::is_same_v. The ...
M. Saintourens's user avatar
1 vote
0 answers
51 views

The React tutorial of joint js shows a way to use jointjs in react. The tutorial is quite limited: it is basically defining a special named div and putting all jointjs code inside. The jointjs ...
paul23's user avatar
  • 221

15 30 50 per page
1
2 3 4 5
64