Settings

Theme

My Favorite CS Puzzle – An Interactive Walkthrough

assaf.dev

1 points by assafk a year ago · 2 comments

Reader

Sianko a year ago

I think the value of a repeated number can be found much easier: ``` long sum = 0; for (int i = 0; i < n; i++) { if(i < n - 1) { sum -= i; } sum += array[i]; }

printf("Element %d\r\n", sum); ```

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection