Skip to content

Commit a4d09bf

Browse files
committed
lil fixes
1 parent 805bbf6 commit a4d09bf

5 files changed

+3
-46
lines changed

binary-search-tree.js

-42
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,3 @@
1-
/* class BinarySearchTreeNode{
2-
constructor(key, value, size){
3-
this.key = key;
4-
this.value = value;
5-
this.size = size;
6-
}
7-
}
8-
9-
class BinarySearchTree{
10-
constructor(){
11-
this.root = null;
12-
this.n = 0; //размер дерева
13-
}
14-
15-
add(key, value){
16-
17-
}
18-
19-
get(key){
20-
21-
}
22-
23-
isEmpty(){
24-
return this.n === 0;
25-
}
26-
27-
size(){
28-
return this.n
29-
}
30-
31-
contains(key){
32-
if(key == null) return false;
33-
return this.get(key) != null;
34-
}
35-
36-
37-
} */
38-
391
class Node{
402
constructor(data, left = null, right = null){
413
this.data = data;
@@ -159,8 +121,4 @@ class BinarySearchTree{
159121
}
160122
this.root = removeNode(this.root, data);
161123
}
162-
163-
traverse(){
164-
165-
}
166124
}

breadth-first-search.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Bfs {
1919
this.searched = [];
2020
};
2121
/**
22-
* Проверяю последнюю букву в имени. Если == 'm', тогда продавец.
22+
* Проверяю последнюю букву в имени. Если == 'm', тогда это продавец.
2323
*/
2424

2525
isSeller(person) {

djkstras algorithm.js

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ class Djkstra {
4545
}
4646

4747
createParents(graph) {
48-
//this.createGraph(this.parents, null, keys[0]);
4948
const keys = Object.keys(graph);
5049

5150
keys.forEach(el => {

graph.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Graph {
5454
return this.store[key].indexOf(value) === -1
5555
}
5656

57-
/** Добавляет вершину name в список key*/
57+
/** Добавляет вершину name в список key */
5858

5959
addFriends(key, name) {
6060
this.store[key].push(name)

greedy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* statesNeeded - список требуемых шатов, stations - станции и штаты вещания*/
1+
/* statesNeeded - список требуемых шатов, stations - станции и штаты вещания */
22

33
const statesNeeded = new Set(['mt', 'wa', 'or', 'id', 'nv', 'ut', 'ca', 'az']),
44
stations = {

0 commit comments

Comments
 (0)