summaryrefslogtreecommitdiff
path: root/other/josephus2.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/josephus2.cpp
parentef7afcfd1294c873369245a940e3aa8accb67b60 (diff)
Typesetting other section.
Diffstat (limited to 'other/josephus2.cpp')
-rw-r--r--other/josephus2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/other/josephus2.cpp b/other/josephus2.cpp
index c0bcc2f..a973609 100644
--- a/other/josephus2.cpp
+++ b/other/josephus2.cpp
@@ -1,8 +1,8 @@
-int rotateLeft(int n) { // Gibt Index des letzten Überlebenden zurück, 1-basiert.
+int rotateLeft(int n) { // Der letzte Überlebende, 1-basiert.
for (int i = 31; i >= 0; i--)
if (n & (1 << i)) {
n &= ~(1 << i);
break;
}
n <<= 1; n++; return n;
-} \ No newline at end of file
+}