mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-07-08 21:16:49 +08:00
Documentation for 20f74d4138
This commit is contained in:
@@ -140,7 +140,7 @@ Functions</h2></td></tr>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p><a href="https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process">Gram Schmidt Orthogonalisation Process</a> </p>
|
||||
<p>Takes the input of Linearly Independent Vectors, returns vectors orthogonal to each other.</p>
|
||||
<h3><a class="anchor" id="autotoc_md72"></a>
|
||||
<h3><a class="anchor" id="autotoc_md73"></a>
|
||||
Algorithm</h3>
|
||||
<p>Take the first vector of given LI vectors as first vector of Orthogonal vectors. Take projection of second input vector on the first vector of Orthogonal vector and subtract it from the 2nd LI vector. Take projection of third vector on the second vector of Othogonal vectors and subtract it from the 3rd LI vector. Keep repeating the above process until all the vectors in the given input array are exhausted.</p>
|
||||
<p>For Example: In R2, Input LI Vectors={(3,1),(2,2)} then Orthogonal Vectors= {(3, 1),(-0.4, 1.2)}</p>
|
||||
|
||||
@@ -149,14 +149,14 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Implementation of the <a href="https://www.geeksforgeeks.org/sublist-search-search-a-linked-list-in-another-list">Sublist Search Algorithm</a> </p>
|
||||
<h3><a class="anchor" id="autotoc_md88"></a>
|
||||
<h3><a class="anchor" id="autotoc_md89"></a>
|
||||
Algorithm</h3>
|
||||
<ul>
|
||||
<li>Sublist search is used to detect a presence of one list in another list.</li>
|
||||
<li>Suppose we have a single-node list (let's say the first list), and we want to ensure that the list is present in another list (let's say the second list), then we can perform the sublist search to find it.</li>
|
||||
<li>For instance, the first list contains these elements: 23 -> 30 -> 41, and the second list contains these elements: 10 -> 15 -> 23 -> 30 -> 41 -> 49. At a glance, we see that the first list presents in the second list.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" id="autotoc_md89"></a>
|
||||
<h3><a class="anchor" id="autotoc_md90"></a>
|
||||
Working</h3>
|
||||
<ul>
|
||||
<li>The sublist search algorithm works by comparing the first element of the first list with the first element of the second list.</li>
|
||||
|
||||
@@ -170,6 +170,11 @@ Data Structures</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/trie_using_hashmap.cpp">Trie Using Hashmap</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md40"></a>
|
||||
Divide And Conquer</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/divide_and_conquer/karatsuba_algorithm_for_fast_multiplication.cpp">Karatsuba Algorithm For Fast Multiplication</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md41"></a>
|
||||
Dynamic Programming</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/0_1_knapsack.cpp">0 1 Knapsack</a></li>
|
||||
@@ -200,13 +205,13 @@ Dynamic Programming</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/tree_height.cpp">Tree Height</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/word_break.cpp">Word Break</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md41"></a>
|
||||
<h1><a class="anchor" id="autotoc_md42"></a>
|
||||
Geometry</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/geometry/jarvis_algorithm.cpp">Jarvis Algorithm</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/geometry/line_segment_intersection.cpp">Line Segment Intersection</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md42"></a>
|
||||
<h1><a class="anchor" id="autotoc_md43"></a>
|
||||
Graph</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/bidirectional_dijkstra.cpp">Bidirectional Dijkstra</a></li>
|
||||
@@ -229,12 +234,12 @@ Graph</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/topological_sort.cpp">Topological Sort</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/topological_sort_by_kahns_algo.cpp">Topological Sort By Kahns Algo</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md43"></a>
|
||||
<h1><a class="anchor" id="autotoc_md44"></a>
|
||||
Graphics</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graphics/spirograph.cpp">Spirograph</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md44"></a>
|
||||
<h1><a class="anchor" id="autotoc_md45"></a>
|
||||
Greedy Algorithms</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/dijkstra.cpp">Dijkstra</a></li>
|
||||
@@ -244,7 +249,7 @@ Greedy Algorithms</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/kruskals_minimum_spanning_tree.cpp">Kruskals Minimum Spanning Tree</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/prims_minimum_spanning_tree.cpp">Prims Minimum Spanning Tree</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md45"></a>
|
||||
<h1><a class="anchor" id="autotoc_md46"></a>
|
||||
Hashing</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/hashing/chaining.cpp">Chaining</a></li>
|
||||
@@ -252,12 +257,12 @@ Hashing</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/hashing/linear_probing_hash_table.cpp">Linear Probing Hash Table</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/hashing/quadratic_probing_hash_table.cpp">Quadratic Probing Hash Table</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md46"></a>
|
||||
<h1><a class="anchor" id="autotoc_md47"></a>
|
||||
Linear Algebra</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/linear_algebra/gram_schmidt.cpp">Gram Schmidt</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md47"></a>
|
||||
<h1><a class="anchor" id="autotoc_md48"></a>
|
||||
Machine Learning</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/a_star_search.cpp">A Star Search</a></li>
|
||||
@@ -268,7 +273,7 @@ Machine Learning</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/ordinary_least_squares_regressor.cpp">Ordinary Least Squares Regressor</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/vector_ops.hpp">Vector Ops</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md48"></a>
|
||||
<h1><a class="anchor" id="autotoc_md49"></a>
|
||||
Math</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/armstrong_number.cpp">Armstrong Number</a></li>
|
||||
@@ -320,7 +325,7 @@ Math</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/sum_of_digits.cpp">Sum Of Digits</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/vector_cross_product.cpp">Vector Cross Product</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md49"></a>
|
||||
<h1><a class="anchor" id="autotoc_md50"></a>
|
||||
Numerical Methods</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/bisection_method.cpp">Bisection Method</a></li>
|
||||
@@ -341,7 +346,7 @@ Numerical Methods</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/rungekutta.cpp">Rungekutta</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/successive_approximation.cpp">Successive Approximation</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md50"></a>
|
||||
<h1><a class="anchor" id="autotoc_md51"></a>
|
||||
Operations On Datastructures</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/array_left_rotation.cpp">Array Left Rotation</a></li>
|
||||
@@ -356,7 +361,7 @@ Operations On Datastructures</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/trie_multiple_search.cpp">Trie Multiple Search</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/union_of_2_arrays.cpp">Union Of 2 Arrays</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md51"></a>
|
||||
<h1><a class="anchor" id="autotoc_md52"></a>
|
||||
Others</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/buzz_number.cpp">Buzz Number</a></li>
|
||||
@@ -379,7 +384,7 @@ Others</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/tower_of_hanoi.cpp">Tower Of Hanoi</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/vector_important_functions.cpp">Vector Important Functions</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md52"></a>
|
||||
<h1><a class="anchor" id="autotoc_md53"></a>
|
||||
Probability</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/probability/addition_rule.cpp">Addition Rule</a></li>
|
||||
@@ -387,7 +392,7 @@ Probability</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/probability/binomial_dist.cpp">Binomial Dist</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/probability/poisson_dist.cpp">Poisson Dist</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md53"></a>
|
||||
<h1><a class="anchor" id="autotoc_md54"></a>
|
||||
Range Queries</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/fenwick_tree.cpp">Fenwick Tree</a></li>
|
||||
@@ -397,7 +402,7 @@ Range Queries</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/segtree.cpp">Segtree</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/sparse_table.cpp">Sparse Table</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md54"></a>
|
||||
<h1><a class="anchor" id="autotoc_md55"></a>
|
||||
Search</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/binary_search.cpp">Binary Search</a></li>
|
||||
@@ -415,7 +420,7 @@ Search</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/ternary_search.cpp">Ternary Search</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/text_search.cpp">Text Search</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md55"></a>
|
||||
<h1><a class="anchor" id="autotoc_md56"></a>
|
||||
Sorting</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/bead_sort.cpp">Bead Sort</a></li>
|
||||
@@ -456,7 +461,7 @@ Sorting</h1>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/wave_sort.cpp">Wave Sort</a></li>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/wiggle_sort.cpp">Wiggle Sort</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md56"></a>
|
||||
<h1><a class="anchor" id="autotoc_md57"></a>
|
||||
Strings</h1>
|
||||
<ul>
|
||||
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/strings/brute_force_string_searching.cpp">Brute Force String Searching</a></li>
|
||||
|
||||
@@ -136,7 +136,7 @@ Functions</h2></td></tr>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Implementation of <a href="https://en.wikipedia.org/wiki/Bogosort">Bogosort algorithm</a> </p>
|
||||
<p>In computer science, bogosort (also known as permutation sort, stupid sort, slowsort, shotgun sort, random sort, monkey sort, bobosort or shuffle sort) is a highly inefficient sorting algorithm based on the generate and test paradigm. Two versions of this algorithm exist: a deterministic version that enumerates all permutations until it hits a sorted one, and a randomized version that randomly permutes its input.Randomized version is implemented here.</p>
|
||||
<h3><a class="anchor" id="autotoc_md90"></a>
|
||||
<h3><a class="anchor" id="autotoc_md91"></a>
|
||||
Algorithm</h3>
|
||||
<p>Shuffle the array untill array is sorted.</p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/imdeep2905">Deep Raval</a> </dd></dl>
|
||||
|
||||
Reference in New Issue
Block a user