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).

5 votes
2 answers
351 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
  • 503
2 votes
2 answers
256 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
  • 32.3k
0 votes
1 answer
187 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
41 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
128 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
152 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
463 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
894 views

Given ...
友人A's user avatar
  • 273
7 votes
2 answers
671 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
46 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
4 votes
1 answer
73 views

I've got the following SQL that I need to update by adding a new parameter: ...
jp2code's user avatar
  • 328
2 votes
1 answer
146 views

I have some production code that contains a lot of repetition and mixes business logic with auditing and logging. I've made two attempts at refactoring it, primarily using decorators. I'd like to get ...
KJanek's user avatar
  • 143
4 votes
2 answers
156 views

What would be the preferred C way of implementing a simple generic ring-buffer. Which approach from the 2 below (or even some 3rd) would you use and why? Specifically, this will be part of an embedded ...
user1806687's user avatar
3 votes
0 answers
130 views

I have this repository. It contains three variations of a simple sorting algorithm for integer keys. The idea is that we keep a balanced BST in which each node holds the integer key and its frequency. ...
coderodde's user avatar
  • 32.3k
3 votes
2 answers
766 views

This is a follow up question to my Studies on Square Roots post. I'm posting additional code for solving for square root similar to the other, but with more code to benchmark. ...
user avatar

15 30 50 per page
1
2 3 4 5
63