Website Summary Files Commits Branches @commit @diff @stats
path: root / Seminar03 / task01.cpp
diff options
context:
space:
mode:
1 files changed, 0 insertions, 27 deletions
-rw-r--r--Seminar03/task01.cpp27
diff --git a/Seminar03/task01.cpp b/Seminar03/task01.cpp
deleted file mode 100644
index 2a2eff3..0000000
--- a/Seminar03/task01.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-#include<iostream>
-#include<queue>
-#include<string>
-
-// Сложност по време: ?
-// Сложност по памет: ?
-void printAllBinaryNumbers(size_t n) {
- std::queue<std::string> q;
-
- q.push("1");
-
- while(n) {
- std::string currentNumber = q.front();
- q.pop();
-
- std::cout << currentNumber << " ";
-
- q.push(currentNumber + "0");
- q.push(currentNumber + "1");
-
- n--;
- }
-}
-
-int main() {
- printAllBinaryNumbers(10);
-} \ No newline at end of file