summaryrefslogtreecommitdiff
path: root/sonstiges/josephusK.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sonstiges/josephusK.cpp')
-rw-r--r--sonstiges/josephusK.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sonstiges/josephusK.cpp b/sonstiges/josephusK.cpp
index e3fcac2..8758fee 100644
--- a/sonstiges/josephusK.cpp
+++ b/sonstiges/josephusK.cpp
@@ -1,4 +1,4 @@
-int josephus(int n, int k) { //returns the number of the last survivor (0 based)
+int josephus(int n, int k) { // Gibt Index des letzten Überlebenden zurück, 0-basiert.
if (n == 1) return 0;
return (josephus(n - 1, k) + k) % n;
} \ No newline at end of file