Skip to content

Commit

Permalink
Rearranging folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Prins committed Jun 30, 2020
1 parent e1a6ccf commit 89b0e0e
Show file tree
Hide file tree
Showing 176 changed files with 1,025 additions and 969 deletions.
13 changes: 5 additions & 8 deletions C#/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
_add list here_

## Searching
* [Binary Search](BinarySearch.cs)
* [Linear Search](LinearSearch.cs)
* [Binary Search](/search/BinarySearch.cs)
* [Linear Search](/search/LinearSearch.cs)

## Sorting
* [Bubble Sort](BubbleSort.cs)
* [Insertion Sort](InsertionSort.cs)
* [Quick Sort](QuickSort.cs)
* [Bubble Sort](/sort/BubbleSort.cs)
* [Insertion Sort](/sort/InsertionSort.cs)
* [Quick Sort](/sort/QuickSort.cs)

## Machine Learning
_add list here_
Expand All @@ -33,9 +33,6 @@ _add list here_
## Blockchain
_add list here_

## Searching
_add list here_

## Cryptography
_add list here_

Expand Down
1 change: 1 addition & 0 deletions C#/blockchain/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a
1 change: 1 addition & 0 deletions C#/cp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a
Empty file added C#/cryptography/README.md
Empty file.
1 change: 1 addition & 0 deletions C#/dp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a
1 change: 1 addition & 0 deletions C#/ds/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a
1 change: 1 addition & 0 deletions C#/graphs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a
1 change: 1 addition & 0 deletions C#/math/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a
1 change: 1 addition & 0 deletions C#/other/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions C#/search/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions C#/sort/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a
53 changes: 26 additions & 27 deletions C++/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,51 +10,50 @@
# Codes in the C++ language

## Data Structures
* [Binary Tree](BinaryTree.cpp)
* [Contiguous Sub Array with Given Sum](SubArrayWithGivenSum.cpp)
* [Linked List](LinkedList.cpp)
* [Queue](Queue.cpp)
* [Stack](Stack_Implementation.cpp)
* [Binary Search Tree](/ds/BinarySearchTree.cpp)
* [Binary Tree](/ds/BinaryTree.cpp)
* [Linked List](/ds/LinkedList.cpp)
* [Queue](/ds/Queue.cpp)
* [Stack](/ds/Stack_Implementation.cpp)

## Searching
* [Binary Search](Binary_Search.cpp)
* [Linear Search](Linear_Search.cpp)
* [Binary Search](/search/Binary_Search.cpp)
* [Linear Search](/search/Linear_Search.cpp)

## Sorting
* [Array Right Rotation Naive Approach](Array_Right_Rotate.cpp)
* [Bubble Sort](Bubble_Sort.cpp)
* [Insertion Sort](insertion.cpp)
* [Merge Sort](Merge_Sort.cpp)
* [Quick Sort](Quick_Sort.cpp)
* [Randomized Quick Sort](Randomized_Quick_Sort.cpp)
* [Selection Sort](selection_sort.cpp)
* [Shell Sort](ShellSort.cpp)
* [Bubble Sort](/sort/Bubble_Sort.cpp)
* [Insertion Sort](/sort/insertion.cpp)
* [Merge Sort](/sort/Merge_Sort.cpp)
* [Quick Sort](/sort/Quick_Sort.cpp)
* [Randomized Quick Sort](/sort/Randomized_Quick_Sort.cpp)
* [Selection Sort](/sort/selection_sort.cpp)
* [Shell Sort](/sort/ShellSort.cpp)

## Graphs
* [Dijkstra's Algorithm](Dijkstra_algorithm.cpp)
* [In-order (LNR) Tree Traversal](inorder-traversal.cpp)
* [Kruskal's Algorithm](kruskal_Algorithm.cpp)
* [Post-order (LRN) Tree Traversal](Postorder_Traversal.cpp)
* [Pre-order (NLR) Tree Traversal](Preorder_Traversal.cpp)
* [Prim's Algorithm](Prim_Algorithm.cpp)
* [Dijkstra's Algorithm](/graphs/Dijkstra_algorithm.cpp)
* [In-order (LNR) Tree Traversal](/graphs/inorder-traversal.cpp)
* [Kruskal's Algorithm](/graphs/kruskal_Algorithm.cpp)
* [Post-order (LRN) Tree Traversal](/graphs/Postorder_Traversal.cpp)
* [Pre-order (NLR) Tree Traversal](/graphs/Preorder_Traversal.cpp)
* [Prim's Algorithm](/graphs/Prim_Algorithm.cpp)

## Machine Learning
_add list here_

## Mathematics
* [Sieve of Eratosthenes](Sieve_of_Eratosthenes.cpp)
* [Sieve of Eratosthenes](/math/Sieve_of_Eratosthenes.cpp)

## Dynamic Programming
* [Longest increasing subsequence](longest_increasing_subsequence.cpp)
* [Longest increasing subsequence](/dp/longest_increasing_subsequence.cpp)

## Blockchain
_add list here_

## Searching
_add list here_

## Cryptography
_add list here_

## Competitive Programming
* [Array Right Rotation Naive Approach](/cp/Array_Right_Rotate.cpp)
* [Contiguous Sub Array with Given Sum](/cp/SubArrayWithGivenSum.cpp)

## Other
_add list here_
1 change: 1 addition & 0 deletions C++/blockchain/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a
File renamed without changes.
1 change: 1 addition & 0 deletions C++/cp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* Copyright 2020 @author omkarlanghe
*
* @author omkarlanghe
* @file
* Given an unsorted array A of size N of non-negative integers, find a continuous sub-array which adds to a given number S, If not found print -1.
*
Expand Down
Empty file added C++/cryptography/README.md
Empty file.
1 change: 1 addition & 0 deletions C++/dp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
//the following program finds length of longest increasing subsequence in the given array using dynamic programming
//the subsequence is a part of given parent array that has same order of elements as of parent array.
#include<iostream>
using namespace std;

int
main ()
{

int arr[8] = { 10, 22, 9, 33, 21, 50, 41, 6 };

cout << "The elements of array are:";

for (int i = 0; i < 8; i++)
{

cout << arr[i] << " ";

}
int n = 8; //number of elements in array
int count[n];

for (int i = 0; i < n; i++)
{

count[i] = 1; //initially assign every element as 1 because every element is longest increasing subsequence in itself
}
for (int i = 1; i < n; i++)
{ //loop starts from index 1
for (int j = 0; j < i; j++)
{ //next loop runs till one index less than i
if (arr[i] > arr[j] && count[j] + 1 > count[i])
{ // if it finds number smaller than current ith index and it's next element in count array is greater than ith index by one
count[i] = count[j] + 1; //then increment the count of ith element in count array by 1
}

}

}

int max = 0; //initially assign max variable as 0
for (int i = 0; i < n; i++)
{

if (count[i] > max)
{ //if current element is larger than max
max = count[i]; //assign maximum value in max variable
}

}

cout << "\n" << "The length of longest increasing subsequence is " << max;

}
//the following program finds length of longest increasing subsequence in the given array using dynamic programming
//the subsequence is a part of given parent array that has same order of elements as of parent array.
#include<iostream>
using namespace std;

int
main ()
{

int arr[8] = { 10, 22, 9, 33, 21, 50, 41, 6 };

cout << "The elements of array are:";

for (int i = 0; i < 8; i++)
{

cout << arr[i] << " ";

}
int n = 8; //number of elements in array
int count[n];

for (int i = 0; i < n; i++)
{

count[i] = 1; //initially assign every element as 1 because every element is longest increasing subsequence in itself
}
for (int i = 1; i < n; i++)
{ //loop starts from index 1
for (int j = 0; j < i; j++)
{ //next loop runs till one index less than i
if (arr[i] > arr[j] && count[j] + 1 > count[i])
{ // if it finds number smaller than current ith index and it's next element in count array is greater than ith index by one
count[i] = count[j] + 1; //then increment the count of ith element in count array by 1
}

}

}

int max = 0; //initially assign max variable as 0
for (int i = 0; i < n; i++)
{

if (count[i] > max)
{ //if current element is larger than max
max = count[i]; //assign maximum value in max variable
}

}

cout << "\n" << "The length of longest increasing subsequence is " << max;

}
File renamed without changes.
Loading

0 comments on commit 89b0e0e

Please sign in to comment.