From 0ee61d53b76980b0336554f6d408393fe717a25c Mon Sep 17 00:00:00 2001 From: realstealthninja Date: Wed, 4 Sep 2024 23:46:13 +0000 Subject: [PATCH] Documentation for ef209dfab3622b6aafc7b41115de2c5c13b8944d --- d3/d22/quick__sort__iterative_8cpp.html | 250 ++++++++++++++ d3/d22/quick__sort__iterative_8cpp.js | 7 + ...8ec9ad42717780d6caaff9d3d6977f9_cgraph.map | 25 ++ ...8ec9ad42717780d6caaff9d3d6977f9_cgraph.md5 | 1 + ...8ec9ad42717780d6caaff9d3d6977f9_cgraph.svg | 245 ++++++++++++++ ...ad42717780d6caaff9d3d6977f9_cgraph_org.svg | 219 ++++++++++++ ...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map | 27 ++ ...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 | 1 + ...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg | 320 ++++++++++++++++++ ...b31b5ad750f1fe042a706a4e3d4_cgraph_org.svg | 237 +++++++++++++ d5/d91/namespacesorting.html | 128 +++++++ ...63595fd9a0163b5b997b89fab3a0dc5_cgraph.map | 17 + ...63595fd9a0163b5b997b89fab3a0dc5_cgraph.md5 | 1 + ...63595fd9a0163b5b997b89fab3a0dc5_cgraph.svg | 173 ++++++++++ ...5fd9a0163b5b997b89fab3a0dc5_cgraph_org.svg | 147 ++++++++ ...c8f44b28b4aa96444383030b28f8b34_cgraph.map | 5 + ...c8f44b28b4aa96444383030b28f8b34_cgraph.md5 | 1 + ...c8f44b28b4aa96444383030b28f8b34_cgraph.svg | 65 ++++ ...4b28b4aa96444383030b28f8b34_cgraph_org.svg | 39 +++ d9/d33/quick__sort__iterative_8cpp__incl.map | 13 + d9/d33/quick__sort__iterative_8cpp__incl.md5 | 1 + d9/d33/quick__sort__iterative_8cpp__incl.svg | 138 ++++++++ .../quick__sort__iterative_8cpp__incl_org.svg | 112 ++++++ dir_bb1b521853a9c46347182a9d10420771.html | 3 + dir_bb1b521853a9c46347182a9d10420771.js | 1 + doxygen_crawl.html | 8 + files.html | 19 +- globals_func_m.html | 2 +- globals_func_t.html | 2 +- globals_m.html | 2 +- globals_t.html | 2 +- namespacemembers_func.html | 2 + namespacemembers_i.html | 1 + namespacemembers_p.html | 1 + namespaces_dup.js | 2 + navtreedata.js | 20 +- navtreeindex10.js | 24 +- navtreeindex11.js | 16 +- navtreeindex12.js | 16 +- navtreeindex13.js | 16 +- navtreeindex14.js | 7 + navtreeindex3.js | 16 +- navtreeindex4.js | 20 +- navtreeindex5.js | 52 +-- navtreeindex6.js | 42 +-- navtreeindex7.js | 16 +- navtreeindex8.js | 26 +- navtreeindex9.js | 16 +- search/all_12.js | 2 +- search/all_15.js | 2 +- search/all_16.js | 7 +- search/all_19.js | 2 +- search/all_e.js | 7 +- search/files_11.js | 3 +- search/functions_10.js | 2 +- search/functions_14.js | 2 +- search/functions_9.js | 3 +- search/functions_d.js | 2 +- 58 files changed, 2369 insertions(+), 167 deletions(-) create mode 100644 d3/d22/quick__sort__iterative_8cpp.html create mode 100644 d3/d22/quick__sort__iterative_8cpp.js create mode 100644 d3/d22/quick__sort__iterative_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.map create mode 100644 d3/d22/quick__sort__iterative_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.md5 create mode 100644 d3/d22/quick__sort__iterative_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.svg create mode 100644 d3/d22/quick__sort__iterative_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph_org.svg create mode 100644 d3/d22/quick__sort__iterative_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map create mode 100644 d3/d22/quick__sort__iterative_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 create mode 100644 d3/d22/quick__sort__iterative_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg create mode 100644 d3/d22/quick__sort__iterative_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph_org.svg create mode 100644 d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph.map create mode 100644 d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph.md5 create mode 100644 d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph.svg create mode 100644 d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph_org.svg create mode 100644 d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph.map create mode 100644 d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph.md5 create mode 100644 d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph.svg create mode 100644 d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph_org.svg create mode 100644 d9/d33/quick__sort__iterative_8cpp__incl.map create mode 100644 d9/d33/quick__sort__iterative_8cpp__incl.md5 create mode 100644 d9/d33/quick__sort__iterative_8cpp__incl.svg create mode 100644 d9/d33/quick__sort__iterative_8cpp__incl_org.svg diff --git a/d3/d22/quick__sort__iterative_8cpp.html b/d3/d22/quick__sort__iterative_8cpp.html new file mode 100644 index 000000000..a5e71cd6f --- /dev/null +++ b/d3/d22/quick__sort__iterative_8cpp.html @@ -0,0 +1,250 @@ + + + + + + + +Algorithms_in_C++: sorting/quick_sort_iterative.cpp File Reference + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Algorithms_in_C++ 1.0.0 +
+
Set of algorithms implemented in C++.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
quick_sort_iterative.cpp File Reference
+
+
+ +

Quick Sort without recursion. This method uses the stack instead. Both recursive and iterative implementations have O(n log n) best case and O(n^2) worst case. +More...

+
#include <iostream>
+#include <vector>
+#include <stack>
+#include <algorithm>
+#include <cassert>
+
+Include dependency graph for quick_sort_iterative.cpp:
+
+
+
+
+ + + + +

+Namespaces

namespace  sorting
 for working with vectors
 
+ + + + + + + + + + + + + +

+Functions

int sorting::partition (std::vector< int > &arr, int start, int end)
 The partition function sorts the array from start to end and uses the last element as the pivot.
 
void sorting::iterativeQuickSort (std::vector< int > &arr)
 The main sorting function.
 
void tests ()
 Self-test implementations.
 
int main ()
 Main function.
 
+

Detailed Description

+

Quick Sort without recursion. This method uses the stack instead. Both recursive and iterative implementations have O(n log n) best case and O(n^2) worst case.

+

https://stackoverflow.com/questions/12553238/quicksort-iterative-or-recursive https://en.wikipedia.org/wiki/Quicksort https://www.geeksforgeeks.org/iterative-quick-sort/

Author
Sebe324
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + +
int main (void )
+
+ +

Main function.

+
Returns
0 on exit
+
129{
+
130 tests(); // run self test implementation
+
131 return 0;
+
132}
+
void tests()
Self-test implementations.
Definition quick_sort_iterative.cpp:94
+
+Here is the call graph for this function:
+
+
+
+ +
+
+ +

◆ tests()

+ +
+
+ + + + + + + +
void tests ()
+
+ +

Self-test implementations.

+
Returns
void
+
95{
+
96 //TEST 1 - Positive numbers
+
97 std::vector<int> case1={100,534,1000000,553,10,61,2000,238,2756,9,12,56,30};
+
98 std::cout<<"TEST 1\n";
+
99 std::cout<<"Before: \n";
+
100 for(auto x : case1) std::cout<<x<<",";
+
101 std::cout<<"\n";
+ +
103 assert(std::is_sorted(std::begin(case1),std::end(case1)));
+
104 std::cout<<"Test 1 succesful!\n";
+
105 std::cout<<"After: \n";
+
106 for(auto x : case1) std::cout<<x<<",";
+
107 std::cout<<"\n";
+
108
+
109 //TEST 2 - Negative numbers
+
110 std::vector<int> case2={-10,-2,-5,-2,-3746,-785,-123, -452, -32456};
+
111 std::cout<<"TEST 2\n";
+
112 std::cout<<"Before: \n";
+
113 for(auto x : case2) std::cout<<x<<",";
+
114 std::cout<<"\n";
+ +
116 assert(std::is_sorted(std::begin(case2),std::end(case2)));
+
117 std::cout<<"Test 2 succesful!\n";
+
118 std::cout<<"After: \n";
+
119 for(auto x : case2) std::cout<<x<<",";
+
120 std::cout<<"\n";
+
121}
+ +
T begin(T... args)
+
T end(T... args)
+
T is_sorted(T... args)
+
void iterativeQuickSort(std::vector< int > &arr)
The main sorting function.
Definition quick_sort_iterative.cpp:58
+ +
+Here is the call graph for this function:
+
+
+
+ +
+
+
+
+ + + + diff --git a/d3/d22/quick__sort__iterative_8cpp.js b/d3/d22/quick__sort__iterative_8cpp.js new file mode 100644 index 000000000..3c77416e6 --- /dev/null +++ b/d3/d22/quick__sort__iterative_8cpp.js @@ -0,0 +1,7 @@ +var quick__sort__iterative_8cpp = +[ + [ "iterativeQuickSort", "d3/d22/quick__sort__iterative_8cpp.html#a263595fd9a0163b5b997b89fab3a0dc5", null ], + [ "main", "d3/d22/quick__sort__iterative_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ], + [ "partition", "d3/d22/quick__sort__iterative_8cpp.html#aac8f44b28b4aa96444383030b28f8b34", null ], + [ "tests", "d3/d22/quick__sort__iterative_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9", null ] +]; \ No newline at end of file diff --git a/d3/d22/quick__sort__iterative_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.map b/d3/d22/quick__sort__iterative_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.map new file mode 100644 index 000000000..8ffe4f08f --- /dev/null +++ b/d3/d22/quick__sort__iterative_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.map @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/d3/d22/quick__sort__iterative_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.md5 b/d3/d22/quick__sort__iterative_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.md5 new file mode 100644 index 000000000..e36ac93fb --- /dev/null +++ b/d3/d22/quick__sort__iterative_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.md5 @@ -0,0 +1 @@ +158ce392a4ad655ed5e2070c61b55785 \ No newline at end of file diff --git a/d3/d22/quick__sort__iterative_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.svg b/d3/d22/quick__sort__iterative_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.svg new file mode 100644 index 000000000..026cbcc97 --- /dev/null +++ b/d3/d22/quick__sort__iterative_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.svg @@ -0,0 +1,245 @@ + + + + + + + + + + + + +tests + + +Node1 + + +tests + + + + + +Node2 + + +std::begin + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +std::end + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +std::is_sorted + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +sorting::iterativeQuickSort + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +sorting::partition + + + + + +Node5->Node6 + + + + + + + + +Node8 + + +stack::pop + + + + + +Node5->Node8 + + + + + + + + +Node9 + + +stack::push + + + + + +Node5->Node9 + + + + + + + + +Node11 + + +std::vector::size + + + + + +Node5->Node11 + + + + + + + + +Node12 + + +stack::top + + + + + +Node5->Node12 + + + + + + + + +Node7 + + +std::swap + + + + + +Node6->Node7 + + + + + + + + +Node10 + + +std::make_shared + + + + + +Node9->Node10 + + + + + + + + + + + + + diff --git a/d3/d22/quick__sort__iterative_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph_org.svg b/d3/d22/quick__sort__iterative_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph_org.svg new file mode 100644 index 000000000..ebd3ad865 --- /dev/null +++ b/d3/d22/quick__sort__iterative_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph_org.svg @@ -0,0 +1,219 @@ + + + + + + +tests + + +Node1 + + +tests + + + + + +Node2 + + +std::begin + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +std::end + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +std::is_sorted + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +sorting::iterativeQuickSort + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +sorting::partition + + + + + +Node5->Node6 + + + + + + + + +Node8 + + +stack::pop + + + + + +Node5->Node8 + + + + + + + + +Node9 + + +stack::push + + + + + +Node5->Node9 + + + + + + + + +Node11 + + +std::vector::size + + + + + +Node5->Node11 + + + + + + + + +Node12 + + +stack::top + + + + + +Node5->Node12 + + + + + + + + +Node7 + + +std::swap + + + + + +Node6->Node7 + + + + + + + + +Node10 + + +std::make_shared + + + + + +Node9->Node10 + + + + + + + + diff --git a/d3/d22/quick__sort__iterative_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map b/d3/d22/quick__sort__iterative_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map new file mode 100644 index 000000000..6e462d101 --- /dev/null +++ b/d3/d22/quick__sort__iterative_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/d3/d22/quick__sort__iterative_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 b/d3/d22/quick__sort__iterative_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 new file mode 100644 index 000000000..d7351b2f3 --- /dev/null +++ b/d3/d22/quick__sort__iterative_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 @@ -0,0 +1 @@ +59d4a23b72d21f40b7731e0cf5a8a31b \ No newline at end of file diff --git a/d3/d22/quick__sort__iterative_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg b/d3/d22/quick__sort__iterative_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg new file mode 100644 index 000000000..af585ec58 --- /dev/null +++ b/d3/d22/quick__sort__iterative_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg @@ -0,0 +1,320 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +main + + +Node1 + + +main + + + + + +Node2 + + +tests + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +std::begin + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +std::end + + + + + +Node2->Node4 + + + + + + + + +Node5 + + +std::is_sorted + + + + + +Node2->Node5 + + + + + + + + +Node6 + + +sorting::iterativeQuickSort + + + + + +Node2->Node6 + + + + + + + + +Node7 + + +sorting::partition + + + + + +Node6->Node7 + + + + + + + + +Node9 + + +stack::pop + + + + + +Node6->Node9 + + + + + + + + +Node10 + + +stack::push + + + + + +Node6->Node10 + + + + + + + + +Node12 + + +std::vector::size + + + + + +Node6->Node12 + + + + + + + + +Node13 + + +stack::top + + + + + +Node6->Node13 + + + + + + + + +Node8 + + +std::swap + + + + + +Node7->Node8 + + + + + + + + +Node11 + + +std::make_shared + + + + + +Node10->Node11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/d3/d22/quick__sort__iterative_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph_org.svg b/d3/d22/quick__sort__iterative_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph_org.svg new file mode 100644 index 000000000..141103d61 --- /dev/null +++ b/d3/d22/quick__sort__iterative_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph_org.svg @@ -0,0 +1,237 @@ + + + + + + +main + + +Node1 + + +main + + + + + +Node2 + + +tests + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +std::begin + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +std::end + + + + + +Node2->Node4 + + + + + + + + +Node5 + + +std::is_sorted + + + + + +Node2->Node5 + + + + + + + + +Node6 + + +sorting::iterativeQuickSort + + + + + +Node2->Node6 + + + + + + + + +Node7 + + +sorting::partition + + + + + +Node6->Node7 + + + + + + + + +Node9 + + +stack::pop + + + + + +Node6->Node9 + + + + + + + + +Node10 + + +stack::push + + + + + +Node6->Node10 + + + + + + + + +Node12 + + +std::vector::size + + + + + +Node6->Node12 + + + + + + + + +Node13 + + +stack::top + + + + + +Node6->Node13 + + + + + + + + +Node8 + + +std::swap + + + + + +Node7->Node8 + + + + + + + + +Node11 + + +std::make_shared + + + + + +Node10->Node11 + + + + + + + + diff --git a/d5/d91/namespacesorting.html b/d5/d91/namespacesorting.html index 7d2c448b1..f193acf79 100644 --- a/d5/d91/namespacesorting.html +++ b/d5/d91/namespacesorting.html @@ -167,6 +167,12 @@ Functions template<typename T > std::vector< T > quicksort (std::vector< T > arr, int32_t low, int32_t high)   +int partition (std::vector< int > &arr, int start, int end) + The partition function sorts the array from start to end and uses the last element as the pivot.
+  +void iterativeQuickSort (std::vector< int > &arr) + The main sorting function.
+  template<typename T > void recursive_bubble_sort (std::vector< T > *nums, uint64_t n)  This is an implementation of the recursive_bubble_sort. A vector is passed to the function which is then dereferenced, so that the changes are reflected in the original vector. It also accepts a second parameter of type int and name n, which is the size of the array.
@@ -202,6 +208,7 @@ Functions

Sorting algorithms

for std::is_sorted for std::assert for std::time for IO operations

Sorting algorithms

+

for std::cout for std::vector for std::stack for std::is_sorted for assert

header files for collection of functions for a macro called assert which can be used to verify assumptions for io operations

Sorting algorithms

for std::is_sorted(), std::swap() for std::array for assert for initializing random number generator for IO operations

@@ -545,6 +552,72 @@ Here is the call graph for this function:
+ + + +

◆ iterativeQuickSort()

+ +
+
+ + + + + + + +
void sorting::iterativeQuickSort (std::vector< int > & arr)
+
+ +

The main sorting function.

+

The iterative quick sort uses the stack instead of recursion for saving and restoring the environment between calls. It does not need the end and start params, because it is not recursive.

Parameters
+ + +
arrarray to be sorted
+
+
+
Returns
void
+
59{
+ +
61 int start = 0;
+
62 int end = arr.size()-1;
+
63 stack.push(start);
+
64 stack.push(end);
+
65
+
66 while(!stack.empty())
+
67 {
+
68 end = stack.top();
+
69 stack.pop();
+
70 start = stack.top();
+
71 stack.pop();
+
72
+
73 int pivotIndex = partition(arr,start,end);
+
74
+
75 if(pivotIndex -1 > start)
+
76 {
+
77 stack.push(start);
+
78 stack.push(pivotIndex-1);
+
79 }
+
80
+
81 if(pivotIndex+1<end)
+
82 {
+
83 stack.push(pivotIndex+1);
+
84 stack.push(end);
+
85 }
+
86 }
+
87}
+
for std::invalid_argument
Definition stack.hpp:19
+
void pop()
Definition stack.hpp:62
+
void push(const value_type &item)
Definition stack.hpp:47
+
value_type top() const
Definition stack.hpp:56
+
char stack[MAX]
Definition paranthesis_matching.cpp:20
+ +
+Here is the call graph for this function:
+
+
+
+
@@ -755,6 +828,61 @@ Here is the call graph for this function:
+ + + +

◆ partition()

+ +
+
+ + + + + + + + + + + + + + + + +
int sorting::partition (std::vector< int > & arr,
int start,
int end )
+
+ +

The partition function sorts the array from start to end and uses the last element as the pivot.

+
Parameters
+ + + + +
arrthe array to be sorted
startstarting index
endending index
+
+
+
Returns
int next index of the pivot
+
34{
+
35 int pivot = arr[end];
+
36 int index = start - 1;
+
37
+
38 for (int j = start; j < end; j++) {
+
39 if (arr[j] <= pivot) {
+
40 std::swap(arr[++index], arr[j]);
+
41 }
+
42 }
+
43
+
44 std::swap(arr[index + 1], arr[end]);
+
45 return index + 1;
+
46}
+
+Here is the call graph for this function:
+
+
+
+
diff --git a/d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph.map b/d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph.map new file mode 100644 index 000000000..fec18d63f --- /dev/null +++ b/d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph.map @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph.md5 b/d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph.md5 new file mode 100644 index 000000000..973aed750 --- /dev/null +++ b/d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph.md5 @@ -0,0 +1 @@ +294ca56a54bd9dc9c0c33ab45e58117f \ No newline at end of file diff --git a/d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph.svg b/d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph.svg new file mode 100644 index 000000000..a03f77b78 --- /dev/null +++ b/d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph.svg @@ -0,0 +1,173 @@ + + + + + + + + + + + + +sorting::iterativeQuickSort + + +Node1 + + +sorting::iterativeQuickSort + + + + + +Node2 + + +sorting::partition + + + + + +Node1->Node2 + + + + + + + + +Node4 + + +stack::pop + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +stack::push + + + + + +Node1->Node5 + + + + + + + + +Node7 + + +std::vector::size + + + + + +Node1->Node7 + + + + + + + + +Node8 + + +stack::top + + + + + +Node1->Node8 + + + + + + + + +Node3 + + +std::swap + + + + + +Node2->Node3 + + + + + + + + +Node6 + + +std::make_shared + + + + + +Node5->Node6 + + + + + + + + + + + + + diff --git a/d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph_org.svg b/d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph_org.svg new file mode 100644 index 000000000..e1cc4f16b --- /dev/null +++ b/d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph_org.svg @@ -0,0 +1,147 @@ + + + + + + +sorting::iterativeQuickSort + + +Node1 + + +sorting::iterativeQuickSort + + + + + +Node2 + + +sorting::partition + + + + + +Node1->Node2 + + + + + + + + +Node4 + + +stack::pop + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +stack::push + + + + + +Node1->Node5 + + + + + + + + +Node7 + + +std::vector::size + + + + + +Node1->Node7 + + + + + + + + +Node8 + + +stack::top + + + + + +Node1->Node8 + + + + + + + + +Node3 + + +std::swap + + + + + +Node2->Node3 + + + + + + + + +Node6 + + +std::make_shared + + + + + +Node5->Node6 + + + + + + + + diff --git a/d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph.map b/d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph.map new file mode 100644 index 000000000..f99841a95 --- /dev/null +++ b/d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph.md5 b/d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph.md5 new file mode 100644 index 000000000..99907722e --- /dev/null +++ b/d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph.md5 @@ -0,0 +1 @@ +f199f7b9b09e1c37660325651551806f \ No newline at end of file diff --git a/d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph.svg b/d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph.svg new file mode 100644 index 000000000..6bb876f3e --- /dev/null +++ b/d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + +sorting::partition + + +Node1 + + +sorting::partition + + + + + +Node2 + + +std::swap + + + + + +Node1->Node2 + + + + + + + + + + + + + diff --git a/d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph_org.svg b/d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph_org.svg new file mode 100644 index 000000000..f26fac051 --- /dev/null +++ b/d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph_org.svg @@ -0,0 +1,39 @@ + + + + + + +sorting::partition + + +Node1 + + +sorting::partition + + + + + +Node2 + + +std::swap + + + + + +Node1->Node2 + + + + + + + + diff --git a/d9/d33/quick__sort__iterative_8cpp__incl.map b/d9/d33/quick__sort__iterative_8cpp__incl.map new file mode 100644 index 000000000..51eb1e3c6 --- /dev/null +++ b/d9/d33/quick__sort__iterative_8cpp__incl.map @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/d9/d33/quick__sort__iterative_8cpp__incl.md5 b/d9/d33/quick__sort__iterative_8cpp__incl.md5 new file mode 100644 index 000000000..675c35754 --- /dev/null +++ b/d9/d33/quick__sort__iterative_8cpp__incl.md5 @@ -0,0 +1 @@ +f5939440938d20d43227f64cc1c86d41 \ No newline at end of file diff --git a/d9/d33/quick__sort__iterative_8cpp__incl.svg b/d9/d33/quick__sort__iterative_8cpp__incl.svg new file mode 100644 index 000000000..5c151a833 --- /dev/null +++ b/d9/d33/quick__sort__iterative_8cpp__incl.svg @@ -0,0 +1,138 @@ + + + + + + + + + + + + +sorting/quick_sort_iterative.cpp + + +Node1 + + +sorting/quick_sort +_iterative.cpp + + + + + +Node2 + + +iostream + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +vector + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +stack + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +algorithm + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +cassert + + + + + +Node1->Node6 + + + + + + + + + + + + + diff --git a/d9/d33/quick__sort__iterative_8cpp__incl_org.svg b/d9/d33/quick__sort__iterative_8cpp__incl_org.svg new file mode 100644 index 000000000..169564579 --- /dev/null +++ b/d9/d33/quick__sort__iterative_8cpp__incl_org.svg @@ -0,0 +1,112 @@ + + + + + + +sorting/quick_sort_iterative.cpp + + +Node1 + + +sorting/quick_sort +_iterative.cpp + + + + + +Node2 + + +iostream + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +vector + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +stack + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +algorithm + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +cassert + + + + + +Node1->Node6 + + + + + + + + diff --git a/dir_bb1b521853a9c46347182a9d10420771.html b/dir_bb1b521853a9c46347182a9d10420771.html index 0134c5922..8ae783658 100644 --- a/dir_bb1b521853a9c46347182a9d10420771.html +++ b/dir_bb1b521853a9c46347182a9d10420771.html @@ -160,6 +160,9 @@ Files  quick_sort_3.cpp  Implementation Details.
  + quick_sort_iterative.cpp + Quick Sort without recursion. This method uses the stack instead. Both recursive and iterative implementations have O(n log n) best case and O(n^2) worst case.
 radix_sort2.cpp  Algorithm of Radix sort
  diff --git a/dir_bb1b521853a9c46347182a9d10420771.js b/dir_bb1b521853a9c46347182a9d10420771.js index ba34df53e..ff7638f79 100644 --- a/dir_bb1b521853a9c46347182a9d10420771.js +++ b/dir_bb1b521853a9c46347182a9d10420771.js @@ -17,6 +17,7 @@ var dir_bb1b521853a9c46347182a9d10420771 = [ "pigeonhole_sort.cpp", "dd/da8/pigeonhole__sort_8cpp.html", "dd/da8/pigeonhole__sort_8cpp" ], [ "quick_sort.cpp", "d1/d21/quick__sort_8cpp.html", "d1/d21/quick__sort_8cpp" ], [ "quick_sort_3.cpp", "d3/d4c/quick__sort__3_8cpp.html", "d3/d4c/quick__sort__3_8cpp" ], + [ "quick_sort_iterative.cpp", "d3/d22/quick__sort__iterative_8cpp.html", "d3/d22/quick__sort__iterative_8cpp" ], [ "radix_sort2.cpp", "d8/d61/radix__sort2_8cpp.html", "d8/d61/radix__sort2_8cpp" ], [ "random_pivot_quick_sort.cpp", "d1/daa/random__pivot__quick__sort_8cpp.html", "d1/daa/random__pivot__quick__sort_8cpp" ], [ "recursive_bubble_sort.cpp", "d3/df9/recursive__bubble__sort_8cpp.html", "d3/df9/recursive__bubble__sort_8cpp" ], diff --git a/doxygen_crawl.html b/doxygen_crawl.html index 589da33e7..ab5365338 100644 --- a/doxygen_crawl.html +++ b/doxygen_crawl.html @@ -287,6 +287,7 @@ + @@ -1412,6 +1413,11 @@ + + + + + @@ -1921,6 +1927,7 @@ + @@ -1933,6 +1940,7 @@ + diff --git a/files.html b/files.html index 5190234fd..c1c1cd1b8 100644 --- a/files.html +++ b/files.html @@ -403,15 +403,16 @@ N)\) time, with precision fixed using pigeonhole_sort.cppImplementation of [Pigeonhole Sort algorithm] (https://en.wikipedia.org/wiki/Pigeonhole_sort)  quick_sort.cppQuick sort implementation in C++  quick_sort_3.cppImplementation Details - radix_sort2.cppAlgorithm of Radix sort - random_pivot_quick_sort.cppImplementation of the Random Pivot Quick Sort algorithm - recursive_bubble_sort.cppThis is an implementation of a recursive version of the Bubble sort algorithm - selection_sort_recursive.cppImplementation of the Selection sort implementation using recursion - shell_sort2.cppShell sort algorithm - stooge_sort.cppStooge sort implementation in C++ - strand_sort.cppImplementation of Strand Sort algorithm - wave_sort.cppImplementation of the Wave sort algorithm - wiggle_sort.cpp[Wiggle Sort Algorithm] (https://leetcode.com/problems/wiggle-sort-ii/) Implementation + quick_sort_iterative.cppQuick Sort without recursion. This method uses the stack instead. Both recursive and iterative implementations have O(n log n) best case and O(n^2) worst case + radix_sort2.cppAlgorithm of Radix sort + random_pivot_quick_sort.cppImplementation of the Random Pivot Quick Sort algorithm + recursive_bubble_sort.cppThis is an implementation of a recursive version of the Bubble sort algorithm + selection_sort_recursive.cppImplementation of the Selection sort implementation using recursion + shell_sort2.cppShell sort algorithm + stooge_sort.cppStooge sort implementation in C++ + strand_sort.cppImplementation of Strand Sort algorithm + wave_sort.cppImplementation of the Wave sort algorithm + wiggle_sort.cpp[Wiggle Sort Algorithm] (https://leetcode.com/problems/wiggle-sort-ii/) Implementation   strings  boyer_moore.cppThe Boyer–Moore algorithm searches for occurrences of pattern P in text T by performing explicit character comparisons at different alignments. Instead of a brute-force search of all alignments (of which there are n - m + 1), Boyer–Moore uses information gained by preprocessing P to skip as many alignments as possible  brute_force_string_searching.cppString pattern search - brute force diff --git a/globals_func_m.html b/globals_func_m.html index 711df4bf5..e147301aa 100644 --- a/globals_func_m.html +++ b/globals_func_m.html @@ -107,7 +107,7 @@ $(function(){initNavTree('globals_func_m.html',''); initResizable(true); });
Here is a list of all documented functions with links to the documentation:

- m -