Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions algorithm/backtracking/knight's_tour/desc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"Knight’s tour problem": "A knight's tour is a sequence of moves of a knight on a chessboard such that the knight visits every square only once. If the knight ends on a square that is one knight's move from the beginning square (so that it could tour the board again immediately, following the same path), the tour is closed, otherwise it is open.",
"Complexity": {
"time": "Worst $$O(8^{N^{2}})$$",
"space": "Worst $$O(N^2)$$"
"time": "Worst $O(8^{N^{2}})$",
"space": "Worst $O(N^2)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Knight%27s_tour'>Wikipedia</a>"
Expand Down
4 changes: 2 additions & 2 deletions algorithm/backtracking/n_queens/desc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Searching"
],
"Complexity": {
"time": "Worst $$O(N!)$$",
"space": "Worst $$O(N)$$"
"time": "Worst $O(N!)$",
"space": "Worst $O(N)$"
},
"References": [
"<a href='http://www.geeksforgeeks.org/backtracking-set-3-n-queen-problem/'>geeksforgeeks</a>"
Expand Down
4 changes: 2 additions & 2 deletions algorithm/cryptography/affine_cipher/desc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"More complex Variations of Affine Cipher are used in practical cryptography"
],
"Complexity": {
"time": "worst O(N), N = length of plain/cipher text",
"space": "worst O(N), to create the new mapping (plain->cipher, cipher->plain)"
"time": "worst $O(N)$, $N$ = length of plain/cipher text",
"space": "worst $O(N)$, to create the new mapping (plain->cipher, cipher->plain)"
},
"References": [
"<a href='http://practicalcryptography.com/ciphers/affine-cipher/'>Practicalcryptography</a>"
Expand Down
6 changes: 3 additions & 3 deletions algorithm/dp/catalan_number/desc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"The number of ways to cut an n+2-sided convex polygon in a plane into triangles by connecting vertices with straight, non-intersecting lines is the nth Catalan number. This is the application in which Euler was interested."
],
"Complexity": {
"time": " O(N<sup>2</sup>)",
"space": "O(N)"
"time": " $O(N^2)$",
"space": "$O(N)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Catalan_number'>Wikipedia</a>",
Expand All @@ -16,4 +16,4 @@
"files": {
"catalan_number": "Catalan Number"
}
}
}
4 changes: 2 additions & 2 deletions algorithm/dp/fibonacci/desc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"Fibonacci Sequence": "Finding Fibonacci sequence using dynamic programming.",
"Complexity": {
"time": "O(n)",
"space": "O(n)"
"time": "$O(n)$",
"space": "$O(n)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Dynamic_programming#Fibonacci_sequence'>Wikipedia</a>"
Expand Down
6 changes: 3 additions & 3 deletions algorithm/dp/integer_partition/desc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"Integer Partition": "In number theory and combinatorics, a partition of a positive integer n, also called an integer partition, is a way of writing n as a sum of positive integers.",
"Complexity": {
"time": "O(n(log n))",
"space": "O(n<sup>2</sup>)"
"time": "$O(n(log \\, n))$",
"space": "$O(n^2)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Partition_(number_theory)'>Wikipedia</a>"
],
"files": {
"basic": "Integer partition"
}
}
}
4 changes: 2 additions & 2 deletions algorithm/dp/knapsack_problem/desc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"Knapsack Problem": "Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible.",
"Complexity": {
"time": "O(n<sup>2</sup>)",
"space": "O(n<sup>2</sup>)"
"time": "$O(n^2)$",
"space": "$O(n^2)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Knapsack_problem'>Wikipedia</a>"
Expand Down
6 changes: 3 additions & 3 deletions algorithm/dp/longest_common_subsequence/desc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"Longest Common Subsequence": "The longest common subsequence (LCS) problem is the problem of finding the longest subsequence common to all sequences in a set of sequences (often just two sequences)." ,
"Complexity": {
"time": "O(mn)",
"space": "O(mn)"
"time": "$O(m\\cdot n)$",
"space": "$O(m\\cdot n)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Longest_common_subsequence_problem'>Wikipedia</a>"
],
"files": {
"basic": "Longest common subsequence"
}
}
}
6 changes: 3 additions & 3 deletions algorithm/dp/longest_increasing_subsequence/desc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"Longest Increasing Subsequence": "Find the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in increasing order",
"Complexity": {
"time": "O(n(log n))",
"space": "O(n)"
"time": "$O(n(log\\,n))$",
"space": "$O(n)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Longest_increasing_subsequence'>Wikipedia</a>"
],
"files": {
"basic": "Longest increasing subsequence"
}
}
}
4 changes: 2 additions & 2 deletions algorithm/dp/longest_palindromic_subsequence/desc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"Longest Palindromic Subsequence": "Find the length of the longest palindromic subsequence in a given sequence",
"Complexity": {
"time": "O(n<sup>2</sup>)",
"space": "O(n<sup>2</sup>)"
"time": "$O(n^2)$",
"space": "$O(n^2)$"
},
"References": [
"<a href='http://www.geeksforgeeks.org/dynamic-programming-set-12-longest-palindromic-subsequence/'>GeeksForGeeks</a>"
Expand Down
6 changes: 3 additions & 3 deletions algorithm/dp/max_subarray/desc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"Maximum Subarray": "Find the sum of the maximum Subarray in the given Array",
"Complexity": {
"time": "O(n)",
"space": "O(n)"
"time": "$O(n)$",
"space": "$O(n)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Maximum_subarray_problem'>Wikipedia</a>"
],
"files": {
"basic": "Maximum subarray"
}
}
}
6 changes: 3 additions & 3 deletions algorithm/dp/max_sum_path/desc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"Maximum Sum Path": "Finding the maximum sum in a path from (0, 0) to (N-1, M-1) when can only move to right or down",
"Complexity": {
"time": "O(n)",
"space": "O(n)"
"time": "$O(n)$",
"space": "$O(n)$"
},
"References": [
],
"files": {
"basic": "Maximum sum path"
}
}
}
6 changes: 3 additions & 3 deletions algorithm/dp/pascal_triangle/desc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"Probability"
],
"Complexity": {
"time": " O(N<sup>2</sup>)",
"space": "O(N<sup>2</sup>)"
"time": " $O(N^2)$",
"space": "$O(N^2)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Pascal%27s_triangle'>Wikipedia</a>"
],
"files": {
"pascal_triangle": "Pascal's Triangle"
}
}
}
6 changes: 3 additions & 3 deletions algorithm/dp/shortest_common_supersequence/desc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"Shortest Common Supersequence": "n computer science, the shortest common supersequence problem is a problem closely related to the longest common subsequence problem. Given two sequences X = < x1,...,xm > and Y = < y1,...,yn >, a sequence U = < u1,...,uk > is a common supersequence of X and Y if U is a supersequence of both X and Y. In other words, a shortest common supersequence of strings x and y is a shortest string z such that both x and y are subsequences of z." ,
"Complexity": {
"time": "O(mn)",
"space": "O(mn)"
"time": "$O(m\\cdot n)$",
"space": "$O(m\\cdot n)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Shortest_common_supersequence_problem'>Wikipedia</a>"
],
"files": {
"basic": "Shortest common supersequence"
}
}
}
6 changes: 3 additions & 3 deletions algorithm/dp/sliding_window/desc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"Sliding Window": "Finding the largest sum of three contiguous number",
"Complexity": {
"time": "O(n)",
"space": "O(n)"
"time": "$O(n)$",
"space": "$O(n)$"
},
"References": [
],
"files": {
"basic": "Sliding window"
}
}
}
6 changes: 3 additions & 3 deletions algorithm/dp/ugly_numbers/desc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"Ugly Numbers": "Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence (1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, …) shows the first 11 ugly numbers. By convention, 1 is included. The given code displays the first N ugly numbers.",
"Complexity": {
"time": "O(n)",
"space": "O(n)"
"time": "$O(n)$",
"space": "$O(n)$"
},
"References": [
"<a href='http://www.algorithmist.com/index.php/UVa_136'>Algorithmist</a>"
],
"files": {
"basic": "Ugly Numbers"
}
}
}
4 changes: 2 additions & 2 deletions algorithm/etc/magic_square/desc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"Magic Square": "In recreational mathematics, a magic square is an arrangement of distinct numbers (i.e., each number is used once), usually integers, in a square grid, where the numbers in each row, and in each column, and the numbers in the main and secondary diagonals, all add up to the same number, called the magic constant. A magic square has the same number of rows as it has columns, and in conventional math notation, 'n' stands for the number of rows (and columns) it has. Thus, a magic square always contains n2 numbers, and its size (the number of rows [and columns] it has) is described as being of order n. A magic square that contains the integers from 1 to n2 is called a normal magic square. (The term magic square is also sometimes used to refer to any of various types of word squares.)",
"Complexity": {
"time": " O(N<sup>2</sup>)",
"space": "O(N<sup>2</sup>)"
"time": " $O(N^2)$",
"space": "$O(N^2)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Magic_square'>Wikipedia</a>"
Expand Down
4 changes: 2 additions & 2 deletions algorithm/graph_search/bellman_ford/desc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"Packet Routing - A variation of BF is used in the Distance vector Routing Protocol"
],
"Complexity": {
"time": "worst O(|V|.|E|)",
"space": "worst O(|V|)"
"time": "worst $O(|V|\\cdot |E|)$",
"space": "worst $O(|V|)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm'>Wikipedia</a>"
Expand Down
6 changes: 3 additions & 3 deletions algorithm/graph_search/bfs/desc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"Construction of the failure function of the Aho-Corasick pattern matcher."
],
"Complexity": {
"time": "worst O(|E|)",
"space": "worst O(|V|)"
"time": "worst $O(|E|)$",
"space": "worst $O(|V|)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Breadth-first_search'>Wikipedia</a>"
Expand All @@ -20,4 +20,4 @@
"tree": "Searching a tree",
"shortest_path": "Finding the shortest path"
}
}
}
6 changes: 3 additions & 3 deletions algorithm/graph_search/bridges/desc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"Finding vulnerabilities in Graphs and Electrical Circuits"
],
"Complexity": {
"time": "worst Naive: O(|E|.(|V|+|E|)), Efficient: O(|V|+|E|)",
"space": "worst O(|V|.|E|)"
"time": "worst Naive: $O(|E| \\cdot (|V|+|E|))$, Efficient: $O(|V|+|E|)$",
"space": "worst $O(|V| \\cdot |E|)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Bridge_(graph_theory)'>Wikipedia</a>"
Expand All @@ -14,4 +14,4 @@
"naive": "Find all the bridges in an Undirected Graph",
"efficient": "Efficiently find all the bridges in an Undirected Graph"
}
}
}
6 changes: 3 additions & 3 deletions algorithm/graph_search/dfs/desc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"Finding biconnectivity in graphs."
],
"Complexity": {
"time": "worst O(|E|)",
"space": "worst O(|V|)"
"time": "worst $O(|E|)$",
"space": "worst $O(|V|)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Depth-first_search'>Wikipedia</a>"
Expand All @@ -27,4 +27,4 @@
"shortest_path": "Finding the shortest path",
"exploration": "Explore an undirected graph to see if it is connected"
}
}
}
6 changes: 3 additions & 3 deletions algorithm/graph_search/dijkstra/desc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"Ar."
],
"Complexity": {
"time": "worst O(|V|<sup>2</sup>)",
"space": "worst O(|V|)"
"time": "worst $O(|V|^2)$",
"space": "worst $O(|V|)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm'>Wikipedia</a>"
],
"files": {
"shortest_path": "Finding the shortest path between two nodes"
}
}
}
6 changes: 3 additions & 3 deletions algorithm/graph_search/floyd_warshall/desc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
""
],
"Complexity": {
"time": "worst O(|V|<sup>3</sup>)",
"space": "worst O(|V|<sup>2</sup>)"
"time": "worst $O(|V|^3)$",
"space": "worst $O(|V|^2)$"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Floyd–Warshall_algorithm'>Wikipedia</a>"
],
"files": {
"shortest_paths": "Finding the shortest path between all nodes"
}
}
}
4 changes: 2 additions & 2 deletions algorithm/graph_search/page_rank/desc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"Web Page Indexing for refining search results"
],
"Complexity": {
"time": "worst O(|V|+|E|)",
"space": "worst O(|V|)"
"time": "worst $O(|V|+|E|)$",
"space": "worst $O(|V|)$"
},
"References": [
"<a href='http://www.cs.princeton.edu/~chazelle/courses/BIB/pagerank.htm'>Princeton university</a>",
Expand Down
4 changes: 2 additions & 2 deletions algorithm/graph_search/topological_sort/desc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"Data serialization"
],
"Complexity": {
"time": "worst O(|V|+|E|)",
"space": "worst O(|V|)"
"time": "worst $O(|V|+|E|)$",
"space": "worst $O(|V|)$"
},
"References": [
"<a href='http://www.geeksforgeeks.org/topological-sorting-indegree-based-solution/'>GeeksForGeeks</a>",
Expand Down
8 changes: 4 additions & 4 deletions algorithm/greedy/job_scheduling/desc.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"Job Scheduling Algorithm": "An array of jobs along with their deadline and profit (if job completes within deadline) where every job takes single unit of time. Maximize total profit if only one job can be scheduled at a time.",
"Applications": [

],
"Complexity": {
"time": " O(N<sup>2</sup>)",
"space": "O(N)"
"time": " $O(N^2)$",
"space": "$O(N)$"
},
"References": [
"<a href='http://ocw.mit.edu/courses/civil-and-environmental-engineering/1-204-computer-algorithms-in-systems-engineering-spring-2010/lecture-notes/MIT1_204S10_lec10.pdf'>mit.edu</a>"
],
"files": {
"job_scheduling": "Job Scheduling Algorithm"
}
}
}
Loading