summaryrefslogtreecommitdiff
path: root/other/josephusK.cpp
diff options
context:
space:
mode:
authormzuenni <michi.zuendorf@gmail.com>2022-06-27 17:19:28 +0200
committermzuenni <michi.zuendorf@gmail.com>2022-06-27 17:19:28 +0200
commit5ab8a5088b729a9953b8dff1b2a985dc8fb2098b (patch)
treeed40d6936c0e9eee40ba62751cbf99ecddbaddc2 /other/josephusK.cpp
parentadabbad9c51cf7cd3874bfde8eac1fbcf84fec10 (diff)
updated tcr
Diffstat (limited to 'other/josephusK.cpp')
-rw-r--r--other/josephusK.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/other/josephusK.cpp b/other/josephusK.cpp
index 522b584..8d4df4d 100644
--- a/other/josephusK.cpp
+++ b/other/josephusK.cpp
@@ -1,4 +1,5 @@
-int josephus(int n, int k) { // Der letzte Überlebende, 0-basiert.
+// Der letzte Überlebende, 0-basiert.
+int josephus(int n, int k) {
if (n == 1) return 0;
return (josephus(n - 1, k) + k) % n;
} \ No newline at end of file