New answers tagged recursion
0
votes
Miller-Rabin Recursive Primality Test
The code isn't tail recursive so you actually have to pay for the recursion with stack and function calls.
You can turn this iterative if you start at the highest bit and work your way down to the ...
2
votes
Accepted
Boolean evaluation
Time complexity cannot be \$n^3\$. There are just too many ways to parenthesize the string, and the code inspects them all.
I run an experiment counting a number of calls to ...
1
vote
Coin partitions
The readability is fine. If you cut out the documentation it's about 15 lines long, and short is almost always readable.
Replace coins.sort with ...
Top 50 recent answers are included
Related Tags
recursion × 1088python × 236
java × 216
algorithm × 171
performance × 153
c++ × 151
javascript × 108
c# × 101
programming-challenge × 76
tree × 69
beginner × 66
python-3.x × 61
c × 55
combinatorics × 50
strings × 48
functional-programming × 48
c++20 × 45
array × 41
dynamic-programming × 34
haskell × 32
sorting × 27
file-system × 27
php × 25
interview-questions × 25
iteration × 23