summaryrefslogtreecommitdiff
path: root/other/josephusK.cpp
diff options
context:
space:
mode:
authorPaul Jungeblut <paul.jungeblut@gmail.com>2016-10-10 21:55:09 +0200
committerPaul Jungeblut <paul.jungeblut@gmail.com>2016-10-10 21:55:09 +0200
commitedecc4b024ceb59b245f888f432018a4f1b7a02c (patch)
tree384e7bafa4b2d9f196bc7135c32e1bdf7aecdb99 /other/josephusK.cpp
parentef7afcfd1294c873369245a940e3aa8accb67b60 (diff)
Typesetting other section.
Diffstat (limited to 'other/josephusK.cpp')
-rw-r--r--other/josephusK.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/other/josephusK.cpp b/other/josephusK.cpp
index 8758fee..522b584 100644
--- a/other/josephusK.cpp
+++ b/other/josephusK.cpp
@@ -1,4 +1,4 @@
-int josephus(int n, int k) { // Gibt Index des letzten Überlebenden zurück, 0-basiert.
+int josephus(int n, int k) { // Der letzte Überlebende, 0-basiert.
if (n == 1) return 0;
return (josephus(n - 1, k) + k) % n;
} \ No newline at end of file