New answers tagged algorithm
1
vote
backward induction algorithm computation
Your typehints are incorrect: current_reward etc. are np.ndarray (the actual runtime type), not ...
2
votes
Tarjan's Strongly Connected Components finding algorithm
Please point out any ... code style issues.
Certainly.
Layout
The code could use some breathing space in terms of blank lines between functions.
The black program can be used to automatically ...
1
vote
N queen problem-like (+rooks and a different goal)
Try to avoid using namespace std;
using namespace std pollutes global namespace and leads to possible conflicts with other functions. Why is "using namespace ...
4
votes
N queen problem-like (+rooks and a different goal)
Why your program can be considered too slow by a 'judge' program
When I execute your program on my Pi 5 (Debian bookworm), because of these lines in your main:
...
7
votes
N queen problem-like (+rooks and a different goal)
The code is almost unreadable
I'm guessing this is one of the problems from a site like HackerRank or LeetCode, and the goal is to solve the problem in as little time as possible. However, single-...
Top 50 recent answers are included
Related Tags
algorithm × 5100java × 1285
python × 1206
performance × 1005
c++ × 850
programming-challenge × 660
javascript × 489
c# × 401
strings × 356
c × 334
python-3.x × 324
sorting × 320
beginner × 306
time-limit-exceeded × 253
graph × 253
array × 247
tree × 213
recursion × 177
interview-questions × 168
python-2.x × 163
complexity × 134
combinatorics × 133
mathematics × 109
c++11 × 102
matrix × 100