Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab3 #983

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
6 changes: 3 additions & 3 deletions Lab3CPP/lab3.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "lab3.h"

Check notice on line 1 in Lab3CPP/lab3.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

Run clang-format on Lab3CPP/lab3.cpp

File Lab3CPP/lab3.cpp does not conform to Custom style guidelines. (lines 3, 4, 5, 6, 8, 9, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 24, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38)

vector<Data> bfs(Data start, Graph& graph) {
Vector bfs(Data start, Graph& graph) {
unordered_set<Data> visited;
Queue *q = queue_create();
vector<Data> result;
Vector result;

queue_insert(q,start);
visited.insert(start);
Expand All @@ -25,7 +25,7 @@
return result;
}

vector<Data> task(ifstream& input, int reactions) {
Vector task(ifstream& input, int reactions) {
Data start;
input >> start;

Expand Down
1 change: 1 addition & 0 deletions Lab3CPP/lab3.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
#ifndef LAB3_H

Check notice on line 1 in Lab3CPP/lab3.h

View workflow job for this annotation

GitHub Actions / cpp-linter

Run clang-format on Lab3CPP/lab3.h

File Lab3CPP/lab3.h does not conform to Custom style guidelines. (lines 4, 16, 17)
#define LAB3_H

#include <iostream>

Check failure on line 4 in Lab3CPP/lab3.h

View workflow job for this annotation

GitHub Actions / cpp-linter

Lab3CPP/lab3.h:4:10 [clang-diagnostic-error]

'iostream' file not found
#include <fstream>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include "queue.h"

using namespace std;

Check warning on line 11 in Lab3CPP/lab3.h

View workflow job for this annotation

GitHub Actions / cpp-linter

Lab3CPP/lab3.h:11:7 [cppcoreguidelines-avoid-non-const-global-variables]

variable 'namespace' is non-const and globally accessible, consider making it const

typedef unordered_map<Data, vector<Data>> Graph;
typedef vector<Data> Vector;

vector<char> bfs(char start, unordered_map<char, vector<char>>& graph);
vector<char> task(ifstream& input, int reactions);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А тут почему другие типы?

Expand Down
Loading