Skip to content

Commit 488daec

Browse files
Merge branch 'master' into ctest
2 parents 61c980d + d4962c3 commit 488daec

22 files changed

+208
-68
lines changed

backtracking/graph_coloring.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
#include <array> /// for std::array
2222
#include <iostream> /// for IO operations
23-
#include <vector> /// for std::vector
2423

2524
/**
2625
* @namespace backtracking

ciphers/base64_encoding.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
* digits.
1212
* @author [Ashish Daulatabad](https://github.com/AshishYUO)
1313
*/
14-
#include <array> /// for `std::array`
1514
#include <cassert> /// for `assert` operations
1615
#include <cstdint>
1716
#include <iostream> /// for IO operations

ciphers/hill_cipher.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ class HillCipher {
379379
int mat_determinant = det_encrypt < 0 ? det_encrypt % L : det_encrypt;
380380

381381
matrix<double> tmp_inverse = get_inverse(encrypt_key);
382-
double d2 = determinant_lu(decrypt_key);
383382

384383
// find co-prime factor for inversion
385384
int det_inv = -1;

data_structures/rb_tree.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class RBtree
3333
};
3434
void RBtree::insert()
3535
{
36-
int z, i = 0;
36+
int z;
3737
cout << "\nEnter key of the node to be inserted: ";
3838
cin >> z;
3939
node *p, *q;

data_structures/trie_tree.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <iostream>
1313
#include <memory>
1414
#include <string>
15-
#include <vector>
1615

1716
/** \namespace data_structures
1817
* \brief Data-structure algorithms

divide_and_conquer/karatsuba_algorithm_for_fast_multiplication.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <cassert> /// for assert
1616
#include <cstring> /// for string
1717
#include <iostream> /// for IO operations
18-
#include <vector> /// for std::vector
1918

2019
/**
2120
* @namespace divide_and_conquer

dynamic_programming/maximum_circular_subarray.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ static void test() {
6767
// Output: 22
6868
// Explanation: Subarray 12, 8, -8, 9, -9, 10 gives the maximum sum, that is 22.
6969

70-
int n = 7; // size of the array
7170
std::vector<int> arr = {8, -8, 9, -9, 10, -11, 12};
7271
assert(dynamic_programming::maxCircularSum(arr) == 22); // this ensures that the algorithm works as expected
7372

graph/breadth_first_search.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
#include <map>
5353
#include <queue>
5454
#include <string>
55-
#include <vector>
5655

5756
/**
5857
* \namespace graph

graph/hopcroft_karp.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ using graph::HKGraph;
254254
*/
255255
void tests(){
256256
// Sample test case 1
257-
int v1a = 3, v1b = 5, e1 = 2; // vertices of left side, right side and edges
257+
int v1a = 3, v1b = 5; // vertices of left side, right side and edges
258258
HKGraph g1(v1a, v1b); // execute the algorithm
259259

260260
g1.addEdge(0,1);
@@ -266,7 +266,7 @@ void tests(){
266266
assert(res1 == expected_res1); // assert check to ensure that the algorithm executed correctly for test 1
267267

268268
// Sample test case 2
269-
int v2a = 4, v2b = 4, e2 = 6; // vertices of left side, right side and edges
269+
int v2a = 4, v2b = 4; // vertices of left side, right side and edges
270270
HKGraph g2(v2a, v2b); // execute the algorithm
271271

272272
g2.addEdge(1,1);
@@ -282,7 +282,7 @@ void tests(){
282282
assert(res2 == expected_res2); // assert check to ensure that the algorithm executed correctly for test 2
283283

284284
// Sample test case 3
285-
int v3a = 6, v3b = 6, e3 = 4; // vertices of left side, right side and edges
285+
int v3a = 6, v3b = 6; // vertices of left side, right side and edges
286286
HKGraph g3(v3a, v3b); // execute the algorithm
287287

288288
g3.addEdge(0,1);

hashing/double_hash_hash_table.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ using double_hashing::totalSize;
248248
* @returns 0 on success
249249
*/
250250
int main() {
251-
int cmd = 0, hash = 0, key = 0;
251+
int cmd = 0, key = 0;
252252
std::cout << "Enter the initial size of Hash Table. = ";
253253
std::cin >> totalSize;
254254
table = std::vector<Entry>(totalSize);

0 commit comments

Comments
 (0)