New pages
Jump to navigation
Jump to search
(newest | oldest) View (newer 20 | older 20) (20 | 50 | 100 | 250 | 500)
- 18:25, 20 September 2020 4.15 (hist) [23 bytes] Algowikiadmin (talk | contribs) (Created page with " Back to Chapter 4")
- 18:25, 20 September 2020 4.13 (hist) [23 bytes] Algowikiadmin (talk | contribs) (Created page with " Back to Chapter 4")
- 18:24, 20 September 2020 4.11 (hist) [3,256 bytes] Algowikiadmin (talk | contribs) (Created page with "Note that there can be at most one element which appears more than n/2 (i.e. at least ceil(n/2) ) times in the list. If we now consider the *sorted* version of the list, we'l...")
- 18:23, 20 September 2020 4.9 (hist) [3,148 bytes] Algowikiadmin (talk | contribs) (Created page with "Here the main thing to notice is that we need a O(<math>n^{k-1}logn</math>) solution. <br /> For various values of k, <br /> k Solution Time Complexity <br /> 1 O...")
- 18:22, 20 September 2020 4.7 (hist) [23 bytes] Algowikiadmin (talk | contribs) (Created page with " Back to Chapter 4")
- 18:21, 20 September 2020 4.5 (hist) [250 bytes] Algowikiadmin (talk | contribs) (Created page with "O(nlogn) solution: : sort the array first, : scan the array, keep updating a max_so_far counter. O(n) solution: : put each value into hash map with the value as key and fre...")
- 18:20, 20 September 2020 4.3 (hist) [354 bytes] Algowikiadmin (talk | contribs) (Created page with "<pre> Algo - If we create pair of (min1, max2n) (min1, max2n-1)... will provide optimal result 1) Sort the set of 2n element (n log n) 2) Now assign two pointers Start: A[...")
- 18:20, 20 September 2020 4.1 (hist) [203 bytes] Algowikiadmin (talk | contribs) (Created page with "Sort it with your favorite nlogn sorting algo. The bottom half is one team, the top half the other. Or much better , partition it with median as pivot . Time complexity O(n)...")
- 18:18, 20 September 2020 3.45 (hist) [3,540 bytes] Algowikiadmin (talk | contribs) (Created page with " == Using a Hashtable == Scan the web page word by word and for each one, except the first, take the pair formed by the previous word + the current one. Use that pair as the...")
- 18:16, 20 September 2020 3.43 (hist) [786 bytes] Algowikiadmin (talk | contribs) (Created page with "<pre> 1) Take two pointers Fast and Slow (Slow jumps one step at a time while Fast two step) 2) While (Fast != NULL) if(Fast == Slow) return true;...")
- 18:14, 20 September 2020 3.41 (hist) [151 bytes] Algowikiadmin (talk | contribs) (Created page with "Create a count sort in magazine until you find all the characters of given string. --Max 06:49, 25 June 2010 (EDT) Back to Chapter 3")
- 18:14, 20 September 2020 3.39 (hist) [2,155 bytes] Algowikiadmin (talk | contribs) (Created page with "== Iterative version with three variables == <pre> Node* ReverseList( Node * List ) { Node *temp1 = *List; Node * temp2 = NULL; Node * temp3 = NULL; while ( temp...")
- 18:12, 20 September 2020 3.37 (hist) [453 bytes] Algowikiadmin (talk | contribs) (Created page with "<pre> bool compare(struct node* a, struct node* b) { // 1. both empty -> true if (a==NULL && b==NULL) return(true); // 2. both non-empty -> compare them else if (a!...")
- 18:10, 20 September 2020 3.35 (hist) [81 bytes] Algowikiadmin (talk | contribs) (Created page with "Sort the shirts by color and do a binary search on color. Back to Chapter 3")
- 18:09, 20 September 2020 3.33 (hist) [23 bytes] Algowikiadmin (talk | contribs) (Created page with " Back to Chapter 3")
- 18:08, 20 September 2020 3.31 (hist) [285 bytes] Algowikiadmin (talk | contribs) (Created page with "Init: k=0 Insert X: k = k+1; A[X] = k; B[k] = X; Search X: return (A[X] < k) and (B[A[X]] == X) Delete X: A[B[k]] = A[X]; B[A[X]] = B[k]; k = k-1; Ple...")
- 18:08, 20 September 2020 3.29 (hist) [1,323 bytes] Algowikiadmin (talk | contribs) (Created page with "In each node of a binary tree store the sub tree sum for the left sub tree. #''Add'': while descending the tree to the left update the sub tree sum by adding the value #''Ins...")
- 18:06, 20 September 2020 3.27 (hist) [417 bytes] Algowikiadmin (talk | contribs) (Created page with "Let's put into the black box whole set <math>S=\{x_i\}_{i=1}^n</math>. If <math>bb(S)</math> is True, then such a subset exists and we can go on: # R:=S # for i:=1 to n do ##...")
- 18:06, 20 September 2020 3.25 (hist) [23 bytes] Algowikiadmin (talk | contribs) (Created page with " Back to Chapter 3")
- 18:05, 20 September 2020 3.23 (hist) [23 bytes] Algowikiadmin (talk | contribs) (Created page with " Back to Chapter 3")