Skip to content

Commit cb13ef9

Browse files
Merge branch 'master' into fix-namespace-issue
2 parents 0668139 + fb27d4d commit cb13ef9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+43
-87
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,9 @@ static void test() {
204204
205205
/**
206206
* @brief Main function
207-
* @param argc commandline argument count (ignored)
208-
* @param argv commandline array of arguments (ignored)
209207
* @returns 0 on exit
210208
*/
211-
int main(int argc, char *argv[]) {
209+
int main() {
212210
test(); // run self-test implementations
213211
// code here
214212
return 0;

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/sparse_table.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,9 @@ static void test() {
155155

156156
/**
157157
* @brief Main function
158-
* @param argc commandline argument count (ignored)
159-
* @param argv commandline array of arguments (ignored)
160158
* @returns 0 on exit
161159
*/
162-
int main(int argc, char *argv[]) {
160+
int main() {
163161
test(); // run self-test implementations
164162
return 0;
165163
}

data_structures/tree_234.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,8 +1291,8 @@ static void test2(int64_t n) {
12911291

12921292
/**
12931293
* @brief Main function
1294-
* @param argc commandline argument count (ignored)
1295-
* @param argv commandline array of arguments (ignored)
1294+
* @param argc commandline argument count
1295+
* @param argv commandline array of arguments
12961296
* @returns 0 on exit
12971297
*/
12981298
int main(int argc, char *argv[]) {

dynamic_programming/fibonacci_bottom_up.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ int fib(int n) {
1111
}
1212
return res[1];
1313
}
14-
int main(int argc, char const *argv[]) {
14+
int main() {
1515
int n;
1616
cout << "Enter n: ";
1717
cin >> n;

dynamic_programming/longest_increasing_subsequence.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,9 @@ static void test() {
7474

7575
/**
7676
* @brief Main function
77-
* @param argc commandline argument count (ignored)
78-
* @param argv commandline array of arguments (ignored)
7977
* @returns 0 on exit
8078
*/
81-
int main(int argc, char const *argv[]) {
79+
int main() {
8280
uint32_t n = 0;
8381

8482
std::cout << "Enter size of array: ";

dynamic_programming/longest_increasing_subsequence_nlogn.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ int LIS(const std::vector<int>& arr, int n) {
2929
}
3030
return active.size(); // size of the LIS.
3131
}
32-
int main(int argc, char const* argv[]) {
32+
int main() {
3333
int n;
3434
cout << "Enter size of array: ";
3535
cin >> n;

dynamic_programming/maximum_circular_subarray.cpp

Lines changed: 1 addition & 4 deletions
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

@@ -80,11 +79,9 @@ static void test() {
8079

8180
/**
8281
* @brief Main function
83-
* @param argc commandline argument count (ignored)
84-
* @param argv commandline array of arguments (ignored)
8582
* @returns 0 on exit
8683
*/
87-
int main(int argc, char *argv[]) {
84+
int main() {
8885
test(); // run self-test implementations
8986
return 0;
9087
}

0 commit comments

Comments
 (0)