commit ac4f3fc710a5cbbde37bf4d5587bf123b3d3f1c9
parent c912cf66e10fa958b148d5cdaadc2b97f88baec7
Author: Victor Adamson <a20vicad@student.his.se>
Date: Fri, 24 Nov 2023 16:22:35 +0100
Started on insertion sort and social network
Diffstat:
2 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/Problem1/Problem1.cpp b/Problem1/Problem1.cpp
@@ -68,6 +68,14 @@ vector<int> bucketSort(vector<int> v)
return sorted;
}
+vector<int> insertSort(vector<int> v)
+{
+ int i, j, temp;
+ for (i = 0; i < v.size(); i++)
+ {
+
+ }
+}
/*
* Function: findMax
diff --git a/Problem2/Problem2.cpp b/Problem2/Problem2.cpp
@@ -1,20 +1,15 @@
-// Problem2.cpp : This file contains the 'main' function. Program execution begins and ends there.
-//
+
#include <iostream>
+#include <queue>
+using namespace std;
int main()
{
- std::cout << "Hello World!\n";
-}
-
-// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
-// Debug program: F5 or Debug > Start Debugging menu
+ queue<int> network;
-// Tips for Getting Started:
-// 1. Use the Solution Explorer window to add/manage files
-// 2. Use the Team Explorer window to connect to source control
-// 3. Use the Output window to see build output and other messages
-// 4. Use the Error List window to view errors
-// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
-// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file
+ while (!network.empty()) {
+ cout << ' ' << network.front();
+ network.pop();
+ }
+}
+\ No newline at end of file