All public logs
Jump to navigation
Jump to search
Combined display of all available logs of The Algorithm Design Manual Solution Wiki. You can narrow down the view by selecting a log type, the username (case-sensitive), or the affected page (also case-sensitive).
(newest | oldest) View (newer 250 | older 250) (20 | 50 | 100 | 250 | 500)- 23:47, 19 September 2021 User account Test1 talk contribs was created
- 18:13, 28 October 2020 Algowikiadmin talk contribs deleted page Solution Wiki, TheAlgorithm Design Manual, 3rd Edition (content was: "The Wiki is an experiment, a grass-roots effort to create an answer key to aid self-study with the third edition of Steven Skiena's ''The Algorithm Design Manual''. Students and other readers are encouraged to contribute hints and answers to all odd-numbered problems in the book, or expand/improve the solution contributed by others. Please do not use this re...", and the only contributor was "Algowikiadmin" (talk))
- 18:09, 28 October 2020 Algowikiadmin talk contribs created page Solution Wiki, The Algorithm Design Manual, 3rd Edition (Created page with " The Wiki is an experiment, a grass-roots effort to create an answer key to aid self-study with the third edition of Steven Skiena's ''The Algorithm Design Manual''. Students...")
- 14:38, 26 October 2020 Algowikiadmin talk contribs deleted page Solution Wiki, TheAlgorithm Design Manual, 3rd Edition" (Broken redirect)
- 14:37, 26 October 2020 Algowikiadmin talk contribs created page Solution Wiki, TheAlgorithm Design Manual, 3rd Edition (Created page with "The Wiki is an experiment, a grass-roots effort to create an answer key to aid self-study with the third edition of Steven Skiena's ''The Algorithm Design Manual''. Students a...")
- 14:36, 26 October 2020 Algowikiadmin talk contribs created page Solution Wiki, TheAlgorithm Design Manual, 3rd Edition" (Created page with "The Wiki is an experiment, a grass-roots effort to create an answer key to aid self-study with the third edition of Steven Skiena's ''The Algorithm Design Manual''. Students a...")
- 21:10, 8 October 2020 User account Ebarker talk contribs was created by Algowikiadmin talk contribs and password was sent by email
- 00:32, 3 October 2020 User account Benwu talk contribs was created by Algowikiadmin talk contribs and password was sent by email
- 18:38, 1 October 2020 User account Zypan talk contribs was created by Algowikiadmin talk contribs and password was sent by email
- 18:11, 1 October 2020 Algowikiadmin talk contribs protected Chapter 2 [Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) (hist)
- 18:11, 1 October 2020 Algowikiadmin talk contribs protected Chapter 12 [Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) (hist)
- 18:10, 1 October 2020 Algowikiadmin talk contribs protected Chapter 11 [Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) (hist)
- 18:10, 1 October 2020 Algowikiadmin talk contribs protected Chapter 10 [Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) (hist)
- 18:10, 1 October 2020 Algowikiadmin talk contribs protected Chapter 9 [Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) (hist)
- 18:09, 1 October 2020 Algowikiadmin talk contribs protected Chapter 8 [Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) (hist)
- 18:08, 1 October 2020 Algowikiadmin talk contribs protected Chapter 7 [Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) (hist)
- 18:08, 1 October 2020 Algowikiadmin talk contribs protected Chapter 6 [Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) (hist)
- 18:08, 1 October 2020 Algowikiadmin talk contribs protected Chapter 5 [Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) (hist)
- 18:06, 1 October 2020 Algowikiadmin talk contribs protected Chapter 4 [Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) (hist)
- 18:06, 1 October 2020 Algowikiadmin talk contribs protected Chapter 3 [Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) (hist)
- 18:06, 1 October 2020 Algowikiadmin talk contribs protected Chapter List [Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) (hist)
- 18:05, 1 October 2020 Algowikiadmin talk contribs protected Chapter 1 [Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) (hist)
- 18:05, 1 October 2020 Algowikiadmin talk contribs protected Main Page [Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) (hist)
- 17:32, 28 September 2020 Algowikiadmin talk contribs created page User:Algowikiadmin (Created page with "This admin account belongs to those that created and moderate this Wiki.")
- 14:12, 21 September 2020 Algowikiadmin talk contribs created page 8.29 (Created page with "1. Find maximum matching. Bipartite matching is described in the book. General matching would require Edmonds Blossom algorithm. 2. Include an arbitrary edge for every uncover...")
- 14:12, 21 September 2020 Algowikiadmin talk contribs created page 8.27 (Created page with "The problem reduces to Floyd - Warshall algorithm if you take logs of all currency-exchange rates, as if a * b = c then ln(a) + ln(b) = ln(c). In computational finance people...")
- 14:11, 21 September 2020 Algowikiadmin talk contribs created page 8.25 (Created page with "Step 1: Perform topological sorting of the graph (we can do it as Graph is acyclic). This is O(n + m) Step 2: Go through vertices in topological order. Initially all vertic...")
- 14:10, 21 September 2020 Algowikiadmin talk contribs created page 8.23 (Created page with " Back to Chapter 8")
- 14:09, 21 September 2020 Algowikiadmin talk contribs created page 8.21 (Created page with " Back to Chapter 8")
- 14:09, 21 September 2020 Algowikiadmin talk contribs created page 8.19 (Created page with " Back to Chapter 8")
- 14:09, 21 September 2020 Algowikiadmin talk contribs created page 8.17 (Created page with " Back to Chapter 8")
- 14:09, 21 September 2020 Algowikiadmin talk contribs created page 8.15 (Created page with " Back to Chapter 8")
- 14:07, 21 September 2020 Algowikiadmin talk contribs created page 8.13 (Created page with " Back to Chapter 8")
- 14:07, 21 September 2020 Algowikiadmin talk contribs created page 8.11 (Created page with " Back to Chapter 8")
- 14:07, 21 September 2020 Algowikiadmin talk contribs created page 8.9 (Created page with " Back to Chapter 8")
- 14:07, 21 September 2020 Algowikiadmin talk contribs created page 8.7 (Created page with " Back to Chapter 8")
- 14:06, 21 September 2020 Algowikiadmin talk contribs created page 8.5 (Created page with "In both algorithms, an edge can only ever be picked once, so they will both eventually terminate regardless of negative edge weights. I also suspect that they still generate...")
- 14:06, 21 September 2020 Algowikiadmin talk contribs created page 8.3 (Created page with "No. Counter example provided below: G(V,E,W) = ((A,B,C,D),({A,B},{B,C},{C,D},{D,A}),(1,2,3,4)) Minimum spanning tree has a weight of 6 with edges {A,B},{B,C},{C,D}. In the...")
- 14:04, 21 September 2020 Algowikiadmin talk contribs created page 8.1 (Created page with " Back to Chapter 8")
- 14:02, 21 September 2020 Algowikiadmin talk contribs created page 9.33 (Created page with "We avoid sums and products and throw away parts of the sample space we don't need. At the same time, we want to be efficient in our use of the space. Conceptually we create a...")
- 14:02, 21 September 2020 Algowikiadmin talk contribs created page 9.31 (Created page with " Back to Chapter 9")
- 14:02, 21 September 2020 Algowikiadmin talk contribs created page 9.29 (Created page with " Back to Chapter 9")
- 14:01, 21 September 2020 Algowikiadmin talk contribs created page 9.27 (Created page with " Back to Chapter 9")
- 14:01, 21 September 2020 Algowikiadmin talk contribs created page 9.25 (Created page with " Back to Chapter 9")
- 14:01, 21 September 2020 Algowikiadmin talk contribs created page 9.23 (Created page with " Back to Chapter 9")
- 14:01, 21 September 2020 Algowikiadmin talk contribs created page 9.21 (Created page with " Back to Chapter 9")
- 14:00, 21 September 2020 Algowikiadmin talk contribs created page 9.19 (Created page with " Back to Chapter 9")
- 14:00, 21 September 2020 Algowikiadmin talk contribs created page 9.17 (Created page with " Back to Chapter 9")
- 14:00, 21 September 2020 Algowikiadmin talk contribs created page 9.15 (Created page with " Back to Chapter 9")
- 14:00, 21 September 2020 Algowikiadmin talk contribs created page 9.13 (Created page with " Back to Chapter 9")
- 14:00, 21 September 2020 Algowikiadmin talk contribs created page 9.11 (Created page with " Back to Chapter 9")
- 13:52, 21 September 2020 Algowikiadmin talk contribs created page 9.9 (Created page with " Back to Chapter 9")
- 13:52, 21 September 2020 Algowikiadmin talk contribs created page 9.7 (Created page with " Back to Chapter 9")
- 13:52, 21 September 2020 Algowikiadmin talk contribs created page 9.5 (Created page with " Back to Chapter 9")
- 13:51, 21 September 2020 Algowikiadmin talk contribs created page 9.3 (Created page with " Back to Chapter 9")
- 13:51, 21 September 2020 Algowikiadmin talk contribs created page 9.1 (Created page with "== Algorithm == Given <code>a</code>, the input array, and <code>curr</code>, the derangement built up so far: # If <code>curr</code> represents a complete solution, print i...")
- 13:49, 21 September 2020 Algowikiadmin talk contribs created page 10.39 (Created page with "== A Python Solution - O(1) == <PRE> import sys n = int(sys.argv[1]) OUT_TMP = "Min # of coins for covering %d: %d, coins used: %s" COINS = tuple(sorted((3, 4, 9, 20, 22, 23)...")
- 13:49, 21 September 2020 Algowikiadmin talk contribs created page 10.41 (Created page with " Back to Chapter 10")
- 13:48, 21 September 2020 Algowikiadmin talk contribs created page 10.37 (Created page with " Back to Chapter 10")
- 13:44, 21 September 2020 Algowikiadmin talk contribs created page 10.35 (Created page with " Back to Chapter 10")
- 13:44, 21 September 2020 Algowikiadmin talk contribs created page 10.33 (Created page with " Back to Chapter 10")
- 13:44, 21 September 2020 Algowikiadmin talk contribs created page 10.31 (Created page with " Back to Chapter 10")
- 13:44, 21 September 2020 Algowikiadmin talk contribs created page 10.29 (Created page with " Back to Chapter 10")
- 13:44, 21 September 2020 Algowikiadmin talk contribs created page 10.27 (Created page with " Back to Chapter 10")
- 13:42, 21 September 2020 Algowikiadmin talk contribs deleted page 10.125 (content was: "#REDIRECT 10.25", and the only contributor was "Algowikiadmin" (talk))
- 13:41, 21 September 2020 Algowikiadmin talk contribs moved page 10.125 to 10.25
- 13:40, 21 September 2020 Algowikiadmin talk contribs created page 10.125 (Created page with " Back to Chapter 10")
- 13:40, 21 September 2020 Algowikiadmin talk contribs created page 10.23 (Created page with " Back to Chapter 10")
- 13:40, 21 September 2020 Algowikiadmin talk contribs created page 10.21 (Created page with " Back to Chapter 10")
- 13:39, 21 September 2020 Algowikiadmin talk contribs created page 10.19 (Created page with " Back to Chapter 10")
- 13:39, 21 September 2020 Algowikiadmin talk contribs created page 10.17 (Created page with " Back to Chapter 10")
- 01:31, 21 September 2020 Algowikiadmin talk contribs created page 10.15 (Created page with " Back to Chapter 10")
- 01:17, 21 September 2020 Algowikiadmin talk contribs created page 10.11 (Created page with "Answer to both a) and b) is no. Knapsack problem is NP-complete. ---- (a) Yes, this is a special case of the Knapsack problem where the value of each item is the same (desc...")
- 01:17, 21 September 2020 Algowikiadmin talk contribs created page 10.13 (Created page with "==== 1 ==== # 20 x 1 # 1 x 6 + 14 x 1 # 2 x 6 + 8 x 1 # 3 x 6 + 2 x 1 # 1 x 10 + 10 x 1 # 1 x 10 + 1 x 6 + 4 x 1 # 2 x 10 ==== 2 ==== More generally: # there is always o...")
- 01:16, 21 September 2020 Algowikiadmin talk contribs created page 10.9 (Created page with " Back to Chapter 10")
- 01:16, 21 September 2020 Algowikiadmin talk contribs created page 10.7 (Created page with " Back to Chapter 10")
- 01:15, 21 September 2020 Algowikiadmin talk contribs created page 10.1 (Created page with " Back to Chapter 10")
- 01:15, 21 September 2020 Algowikiadmin talk contribs created page 10.5 (Created page with " Back to Chapter 10")
- 01:15, 21 September 2020 Algowikiadmin talk contribs created page 10.3 (Created page with " Back to Chapter 10")
- 01:13, 21 September 2020 Algowikiadmin talk contribs created page 7.43 (Created page with " Back to Chapter 7")
- 01:13, 21 September 2020 Algowikiadmin talk contribs created page 7.41 (Created page with " Back to Chapter 7")
- 01:13, 21 September 2020 Algowikiadmin talk contribs created page 7.39 (Created page with " Back to Chapter 7")
- 01:12, 21 September 2020 Algowikiadmin talk contribs created page 7.37 (Created page with "Proof by induction. A tournament with 2 vertices (1,2) has a Hamiltonian path. 1 -> 2 or vice versa Now suppose our tournament with n vertices has a Hamiltonian path 1,..,n....")
- 01:11, 21 September 2020 Algowikiadmin talk contribs created page 7.35 (Created page with " Back to Chapter 7")
- 01:11, 21 September 2020 Algowikiadmin talk contribs created page 7.33 (Created page with " Back to Chapter 7")
- 01:11, 21 September 2020 Algowikiadmin talk contribs created page 7.31 (Created page with " Back to Chapter 7")
- 01:11, 21 September 2020 Algowikiadmin talk contribs created page 7.29 (Created page with " Back to Chapter 7")
- 01:11, 21 September 2020 Algowikiadmin talk contribs created page 7.27 (Created page with " Back to Chapter 7")
- 01:09, 21 September 2020 Algowikiadmin talk contribs created page 7.25 (Created page with "Use the BFS starting from the vertex v. For every node keep track of the level from the vertex v. When w is encountered for the first time the level of w is the length of the...")
- 01:07, 21 September 2020 Algowikiadmin talk contribs created page 7.23 (Created page with " for any node in the tree, there are two possibilities # either the diameter is contained in one of the subtrees # or the node itself is at the top of the longest path in the...")
- 01:06, 21 September 2020 Algowikiadmin talk contribs created page 7.21 (Created page with "(a) Compare every possible set of three vertices and test if there is an edge between the three. (b) One may be tempted to use DFS to find cycle of length 3, by maintaining a...")
- 01:05, 21 September 2020 Algowikiadmin talk contribs created page 7.19 (Created page with "# This translates to the question of labeling the tree with two colors, because this way each edge's vertices are colored differently. The larger group of colors is the sought...")
- 01:04, 21 September 2020 Algowikiadmin talk contribs created page 7.17 (Created page with "1) We can determine that leafs should never be included into the cover. Therefore all leaves should be unmarked, which means that all of their parents should be marked. Now we...")
- 01:03, 21 September 2020 Algowikiadmin talk contribs created page 7.15 (Created page with " Back to Chapter 7")
- 01:03, 21 September 2020 Algowikiadmin talk contribs created page 7.13 (Created page with " Back to Chapter 7")
- 01:02, 21 September 2020 Algowikiadmin talk contribs created page 7.11 (Created page with " Back to Chapter 7")
- 01:02, 21 September 2020 Algowikiadmin talk contribs created page 7.9 (Created page with " Back to Chapter 7")
- 01:01, 21 September 2020 Algowikiadmin talk contribs created page 7.7 (Created page with " Back to Chapter 7")
- 01:01, 21 September 2020 Algowikiadmin talk contribs created page 7.5 (Created page with "Graphs with max degree 2, can be bipartite (even number of edges) or tripartite (odd number of edges) ----- Consider a triangle (3 edges, 3 vertices): it's not bipartite eve...")
- 01:00, 21 September 2020 Algowikiadmin talk contribs created page 7.3 (Created page with "Induction proof: Base case: Tree composed of just two nodes: x(root) and y. There is only one way x -> y Assuming there is an unique path between x and y, we add a new leaf...")
- 00:59, 21 September 2020 Algowikiadmin talk contribs created page 7.1 (Created page with "(a) BFS: * Graph G1: A, B, D, I, C, E, G, J, F, H * Graph G2: A, B, E, C, F, I, D, G, J, M, H, K, N, L, O, P (b) DFS: * Graph G1: A, B, C, E, D, G, H, F, J, I * Graph G2: A,...")
- 00:58, 21 September 2020 Algowikiadmin talk contribs created page 6.11 (Created page with " Back to Chapter 6")
- 00:58, 21 September 2020 Algowikiadmin talk contribs created page 6.9 (Created page with " Back to Chapter 6")
- 00:58, 21 September 2020 Algowikiadmin talk contribs created page 6.7 (Created page with " Back to Chapter 6")
- 00:58, 21 September 2020 Algowikiadmin talk contribs created page 6.5 (Created page with " Back to Chapter 6")
- 00:58, 21 September 2020 Algowikiadmin talk contribs created page 6.1 (Created page with " Back to Chapter 6")
- 00:57, 21 September 2020 Algowikiadmin talk contribs created page 6.3 (Created page with "1) Starting from left to right, the number of inversions for 1st number is n-1 for 2nd number is n-2 ... .. ....nth number is n-n = 0 Total number of inversions is...")
- 00:56, 21 September 2020 Algowikiadmin talk contribs created page 5.15 (Created page with " Back to Chapter 5")
- 00:56, 21 September 2020 Algowikiadmin talk contribs created page 5.13 (Created page with " Back to Chapter 5")
- 00:56, 21 September 2020 Algowikiadmin talk contribs created page 5.11 (Created page with " Back to Chapter 5")
- 00:56, 21 September 2020 Algowikiadmin talk contribs created page 5.9 (Created page with " Back to Chapter 5")
- 00:56, 21 September 2020 Algowikiadmin talk contribs created page 5.7 (Created page with "<math>O(n+m)</math> is necessary and sufficient. Lower bound comes from potentially independent values along second diagonal -- upper bound comes from observing that we can el...")
- 00:55, 21 September 2020 Algowikiadmin talk contribs created page 5.5 (Created page with "Apply binary search to find out transition point <pre> Assume set indexes are zero based FindIndex(A): 1. low = 0, high =1 2. mid = (low + high)/2 3. if(A[mid] >...")
- 00:54, 21 September 2020 Algowikiadmin talk contribs created page 5.3 (Created page with "(1) Do a binary search within the range of <math>1-n</math>. You guess the right number within O(log n) questions. (2) If you don't know n start with a random number <math>2^...")
- 00:53, 21 September 2020 Algowikiadmin talk contribs created page 5.1 (Created page with "'''Part -1''' Since set is sorted the max element will lie at position <pre> Since set is sorted the max element will lie at position Max = Set[k] where k != 0 Set[n...")
- 18:36, 20 September 2020 Algowikiadmin talk contribs created page 4.51 (Created page with "If we are allowed to maintain a second stack on the side, this should be possible. The main stack is a regular stack that can be implemented using an array and an index to the...")
- 18:36, 20 September 2020 Algowikiadmin talk contribs created page 4.53 (Created page with "If we are allowed to maintain a second stack on the side, this should be possible. The main stack is a regular stack that can be implemented using an array and an index to the...")
- 18:35, 20 September 2020 Algowikiadmin talk contribs created page 4.49 (Created page with " Back to Chapter 4")
- 18:34, 20 September 2020 Algowikiadmin talk contribs created page 4.47 (Created page with " For a known set of integer numbers ( assume Nr-1, Nr-2 ... Nr-k) the best is to use a non-comparison based sort algorithm like radix sort with O(n) You have an array that cr...")
- 18:33, 20 September 2020 Algowikiadmin talk contribs created page 4.45 (Created page with " Back to Chapter 4")
- 18:32, 20 September 2020 Algowikiadmin talk contribs created page 4.43 (Created page with " Back to Chapter 4")
- 18:32, 20 September 2020 Algowikiadmin talk contribs created page 4.41 (Created page with " Back to Chapter 4")
- 18:31, 20 September 2020 Algowikiadmin talk contribs created page 4.39 (Created page with " Back to Chapter 4")
- 18:30, 20 September 2020 Algowikiadmin talk contribs created page 4.37 (Created page with " Back to Chapter 4")
- 18:30, 20 September 2020 Algowikiadmin talk contribs created page 4.35 (Created page with "It's not clear to me if the first <math>n - \sqrt n</math> element being sorted means that the remaining <math>\sqrt n</math> elements are all bigger or not, but let's suppose...")
- 18:30, 20 September 2020 Algowikiadmin talk contribs created page 4.33 (Created page with " Back to Chapter 4")
- 18:29, 20 September 2020 Algowikiadmin talk contribs created page 4.31 (Created page with "To guarantee mergesort is stable, when merging the two subarrays together, mergesort should settle ties in the lists by choosing the lower indexed value. Back to Chapter 4")
- 18:28, 20 September 2020 Algowikiadmin talk contribs created page 4.29 (Created page with " Back to Chapter 4")
- 18:28, 20 September 2020 Algowikiadmin talk contribs created page 4.27 (Created page with " Back to Chapter 4")
- 18:28, 20 September 2020 Algowikiadmin talk contribs created page 4.25 (Created page with " Back to Chapter 4")
- 18:28, 20 September 2020 Algowikiadmin talk contribs created page 4.23 (Created page with "<pre> from random import choices def group_by_color(data, start, stop, color): operations_counter = 0 while start < stop and start < len(data) and stop >= 0:...")
- 18:27, 20 September 2020 Algowikiadmin talk contribs created page 4.21 (Created page with "the general form of this problem is to find the kth largest value. finding the median is when k = n/2. to find the kth largest value, * select a partition element and split...")
- 18:26, 20 September 2020 Algowikiadmin talk contribs created page 4.19 (Created page with "1) Finding the maximum element is O(1) in both a max-heap (the root of the heap) and a sorted array (the last element in the array), so for this operation, both data structure...")
- 18:25, 20 September 2020 Algowikiadmin talk contribs created page 4.17 (Created page with "Scan through the array to build an out-of-order heap, that is, the first element is indeed the smallest, but necessarily any of the other elements. This takes us O(n). Then ex...")
- 18:25, 20 September 2020 Algowikiadmin talk contribs created page 4.15 (Created page with " Back to Chapter 4")
- 18:25, 20 September 2020 Algowikiadmin talk contribs created page 4.13 (Created page with " Back to Chapter 4")
- 18:24, 20 September 2020 Algowikiadmin talk contribs created page 4.11 (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 Algowikiadmin talk contribs created page 4.9 (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 Algowikiadmin talk contribs created page 4.7 (Created page with " Back to Chapter 4")
- 18:21, 20 September 2020 Algowikiadmin talk contribs created page 4.5 (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 Algowikiadmin talk contribs created page 4.3 (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 Algowikiadmin talk contribs created page 4.1 (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 Algowikiadmin talk contribs created page 3.45 (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 Algowikiadmin talk contribs created page 3.43 (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 Algowikiadmin talk contribs created page 3.41 (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 Algowikiadmin talk contribs created page 3.39 (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 Algowikiadmin talk contribs created page 3.37 (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 Algowikiadmin talk contribs created page 3.35 (Created page with "Sort the shirts by color and do a binary search on color. Back to Chapter 3")
- 18:09, 20 September 2020 Algowikiadmin talk contribs created page 3.33 (Created page with " Back to Chapter 3")
- 18:08, 20 September 2020 Algowikiadmin talk contribs created page 3.31 (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 Algowikiadmin talk contribs created page 3.29 (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 Algowikiadmin talk contribs created page 3.27 (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 Algowikiadmin talk contribs created page 3.25 (Created page with " Back to Chapter 3")
- 18:05, 20 September 2020 Algowikiadmin talk contribs created page 3.23 (Created page with " Back to Chapter 3")
- 18:05, 20 September 2020 Algowikiadmin talk contribs created page 3.21 (Created page with "Since all the elements in S2 have keys larger than the keys of the elements in S1, those two trees can be subtrees of one tree whose root node will have a key larger than the...")
- 18:04, 20 September 2020 Algowikiadmin talk contribs created page 3.19 (Created page with "Store two values, the maximum and minimum. These need to be checked and potentially updated on every delete. If the minimum is being deleted, call the successor, update the...")
- 18:03, 20 September 2020 Algowikiadmin talk contribs created page 3.17 (Created page with " Back to Chapter 3")
- 18:03, 20 September 2020 Algowikiadmin talk contribs created page 3.15 (Created page with " Back to Chapter 3")
- 18:02, 20 September 2020 Algowikiadmin talk contribs created page 3.13 (Created page with " Back to Chapter 3")
- 18:02, 20 September 2020 Algowikiadmin talk contribs created page 3.11 (Created page with "Since 1,2,...,n is finite, use a bit array to represent them.<br> See the telephone number sorting example in Column 1 of <Programming Pearls> (Jon Bentley) for detailed expla...")
- 18:00, 20 September 2020 Algowikiadmin talk contribs created page 3.9 (Created page with " Back to Chapter 3")
- 17:59, 20 September 2020 Algowikiadmin talk contribs created page 3.7 (Created page with " Back to Chapter 3")
- 17:59, 20 September 2020 Algowikiadmin talk contribs created page 3.5 (Created page with "1. size 4 array with 3 elements. remove 1, insert 1, and so forth. <br> 2. when the array is one-fourth full, shrink its size to half of what it was. Back to Chaprer 3")
- 17:57, 20 September 2020 Algowikiadmin talk contribs created page 3.3 (Created page with "'''C''' <pre> typedef struct Node { char *value; struct Node *next; } Node; int reverse(Node **head) { Node *curr, *prev, *next; if (!head || !(*head)) {...")
- 17:56, 20 September 2020 Algowikiadmin talk contribs created page 3.1 (Created page with "You just need to maintain a count, like so: <pre> public static boolean isBalanced(String str) { int count = 0; for (int i = 0, n = str.length(); i < n;...")
- 22:09, 11 September 2020 Algowikiadmin talk contribs created page 11.35 (Created page with " Back to Chapter 11")
- 22:07, 11 September 2020 Algowikiadmin talk contribs created page 11.33 (Created page with " Back to Chapter 11")
- 22:06, 11 September 2020 Algowikiadmin talk contribs created page 11.31 (Created page with " Back to Chapter 11")
- 22:06, 11 September 2020 Algowikiadmin talk contribs created page 11.29 (Created page with " Back to Chapter 11")
- 22:06, 11 September 2020 Algowikiadmin talk contribs created page 11.27 (Created page with " Back to Chapter 11")
- 19:23, 11 September 2020 Algowikiadmin talk contribs created page 11.25 (Created page with " Back to Chapter 11")
- 19:22, 11 September 2020 Algowikiadmin talk contribs created page 11.23 (Created page with " Back to Chapter 11")
- 19:21, 11 September 2020 Algowikiadmin talk contribs created page 11.21 (Created page with " Back to Chapter 11")
- 19:18, 11 September 2020 Algowikiadmin talk contribs created page 11.13 (Created page with " Back to Chapter 11")
- 19:18, 11 September 2020 Algowikiadmin talk contribs created page 11.19 (Created page with " Back to Chapter 11")
- 19:18, 11 September 2020 Algowikiadmin talk contribs created page 11.17 (Created page with " Back to Chapter 11")
- 19:16, 11 September 2020 Algowikiadmin talk contribs created page 11.15 (Created page with " Back to Chapter 11")
- 21:45, 10 September 2020 Algowikiadmin talk contribs created page 11.11 (Created page with " Back to Chapter 11")
- 21:35, 10 September 2020 Algowikiadmin talk contribs created page 11.9 (Created page with " Back to Chapter 11")
- 21:35, 10 September 2020 Algowikiadmin talk contribs created page 11.7 (Created page with " Back to Chapter 11")
- 21:35, 10 September 2020 Algowikiadmin talk contribs created page 11.5 (Created page with " Back to Chapter 11")
- 21:34, 10 September 2020 Algowikiadmin talk contribs created page 11.3 (Created page with " Back to Chapter 11")
- 21:34, 10 September 2020 Algowikiadmin talk contribs created page 11.1 (Created page with " Back to Chapter 12")
- 21:11, 10 September 2020 Algowikiadmin talk contribs created page 12.19 (Created page with " Back to Chapter 12")
- 21:11, 10 September 2020 Algowikiadmin talk contribs created page 12.21 (Created page with " Back to Chapter 12")
- 21:11, 10 September 2020 Algowikiadmin talk contribs created page 12.17 (Created page with " Back to Chapter 12")
- 21:11, 10 September 2020 Algowikiadmin talk contribs created page 12.15 (Created page with " Back to Chapter 12")
- 21:10, 10 September 2020 Algowikiadmin talk contribs created page 12.13 (Created page with " Back to Chapter 12")
- 21:09, 10 September 2020 Algowikiadmin talk contribs created page 12.11 (Created page with " Back to Chapter 12")
- 21:09, 10 September 2020 Algowikiadmin talk contribs created page 12.9 (Created page with " Back to Chapter 12")
- 21:09, 10 September 2020 Algowikiadmin talk contribs created page 12.7 (Created page with " Back to Chapter 12")
- 21:08, 10 September 2020 Algowikiadmin talk contribs created page 12.5 (Created page with " Back to Chapter 12")
- 21:08, 10 September 2020 Algowikiadmin talk contribs created page 12.3 (Created page with " Back to Chapter 12")
- 21:08, 10 September 2020 Algowikiadmin talk contribs created page 12.1 (Created page with " Back to Chapter 12")
- 20:01, 10 September 2020 Algowikiadmin talk contribs created page 2.21 (Created page with " Back to Chapter 2")
- 20:00, 10 September 2020 Algowikiadmin talk contribs created page 2.19 (Created page with " Back to Chapter 2")
- 20:00, 10 September 2020 Algowikiadmin talk contribs created page 2.25 (Created page with " Back to Chapter 2")
- 19:59, 10 September 2020 Algowikiadmin talk contribs created page 2.23 (Created page with " Back to Chapter 2")
- 19:59, 10 September 2020 Algowikiadmin talk contribs created page 2.27 (Created page with " Back to Chapter 2")
- 19:58, 10 September 2020 Algowikiadmin talk contribs created page 2.29 (Created page with " Back to Chapter 2")
- 19:57, 10 September 2020 Algowikiadmin talk contribs created page 2.31 (Created page with " Back to Chapter 2")
- 19:57, 10 September 2020 Algowikiadmin talk contribs created page 2.33 (Created page with " Back to Chapter 2")
- 19:56, 10 September 2020 Algowikiadmin talk contribs created page 2.35 (Created page with " Back to Chapter 2")
- 19:55, 10 September 2020 Algowikiadmin talk contribs created page 2.37 (Created page with "On careful observation , one can see that the sum of any row is just <math>3^{n-1}</math> this is the sum for the series . This can even be computed using a series as shown b...")
- 19:54, 10 September 2020 Algowikiadmin talk contribs created page 2.39 (Created page with " Back to Chapter 2")
- 19:53, 10 September 2020 Algowikiadmin talk contribs created page 2.41 (Created page with " Back to Chapter 2")
- 19:51, 10 September 2020 Algowikiadmin talk contribs created page 2.43 (Created page with "X=n-digit number (abcdefghijklmn), y= n-digit number (ABCDEFGHIJKLMN) say X * y = X * N + X * M0 + X * L00 + X * K000 + .... + X * B000000000000 + X * A0000000000000 With ea...")
- 19:51, 10 September 2020 Algowikiadmin talk contribs created page 2.45 (Created page with " Back to Chapter 2")
- 19:45, 10 September 2020 Algowikiadmin talk contribs created page 2.47 (Created page with "Change the assumptions of the proof. The paper mentioned is "S. Skiena. Encroaching lists as a measure of presortedness. BIT, 28:775-784, 1988." '''Other solution :''' <m...")
- 19:44, 10 September 2020 Algowikiadmin talk contribs created page 2.49 (Created page with " Back to Chapter 2")
- 19:43, 10 September 2020 Algowikiadmin talk contribs created page 2.51 (Created page with "<pre> 1) Find an empty bag (labeled "E") 2) Place 1 coin from bag 1 into E 3) Place 2 coins from bag 2 into E ... 10) Place 9 coins from bag 9 into E 11) Place 10 coins from b...")
- 19:43, 10 September 2020 Algowikiadmin talk contribs created page 2.53 (Created page with "Some incorrect answers were reached. These have been moved to the discussion, with explanation of where the argument goes wrong. The correct answer: Assuming pairwise merges...")
- 19:41, 10 September 2020 Algowikiadmin talk contribs created page 2.55 (Created page with "This problem is a famous game-theoretical scenario called the pirate game (http://en.wikipedia.org/wiki/Pirate_game). Assume the senior pirate gets to vote. Where there is on...")
- 19:41, 10 September 2020 Algowikiadmin talk contribs created page 2.17 (Created page with " Back to Chapter 2")
- 19:40, 10 September 2020 Algowikiadmin talk contribs created page 2.15 (Created page with " Back to Chapter 2")
- 19:39, 10 September 2020 Algowikiadmin talk contribs created page 2.13 (Created page with "because <math> n^2 <= 2^n </math> for every n greater than 4 . Hence, we can say that <math> n^2 < = C* 2^n </math> for every n>=4 and so <math> n^2 = O(2^n)</math>. Back t...")
- 19:38, 10 September 2020 Algowikiadmin talk contribs created page 2.11 (Created page with " Back to Chapter 2")
- 18:53, 9 September 2020 Algowikiadmin talk contribs created page 2.9 (Created page with "=2-8.= For each of the following pairs of functions, either <math>f(n)</math> is in <math>O(g(n))</math>, <math>f(n)</math> is in <math>\Omega(g(n))</math>, or <math>f(n)=\Th...")
- 18:51, 9 September 2020 Algowikiadmin talk contribs created page 2.7 (Created page with "'''n = 1''' The single element array is already its max. Loop is not entered. Max is returned Let for '''n=k''', the algorithm is true For '''n = k+1''' ,two cases arise :...")
- 18:50, 9 September 2020 Algowikiadmin talk contribs created page 2.5 (Created page with " Back to Chapter 2")
- 18:49, 9 September 2020 Algowikiadmin talk contribs created page 2.3 (Created page with "<math>f(n) = (((n^2)(n+1)^2)/8) + n(n+1)(2n+1)/12</math> ---- This problem does appear to break down into a series of nested summations: <math> \displaystyle\sum_{i=1}^{n}\te...")
- 19:25, 8 September 2020 Algowikiadmin talk contribs created page 2.1 (Created page with " This loop can be expressed as the sum: <math> \sum_{i=1}^{n-1}\sum_{j=i+1}^{n}\sum_{k=1}^{j}1 </math> Reducing this, sum by sum from the rhs: <math> \begin{align} &\sum_{i...")
- 12:25, 1 September 2020 Algowikiadmin talk contribs created page 1.37 (Created page with "I'm envisioning the United States as a rectangle 1000 miles high and 3000 miles long. I'm not including Alaska, because, although it's large, it doesn't have many roads. Much...")
- 12:25, 1 September 2020 Algowikiadmin talk contribs created page 1.35 (Created page with "'''Assumptions''': : approx 400000 cars : each car needs to refuel once a week : each gas station is open 10 hours a day and refuels 10 cars an hour : there are enough station...")
- 12:23, 1 September 2020 Algowikiadmin talk contribs created page 1.33 (Created page with " Answer: Seven races. '''First 5 races:''' Divide 25 horses into 5 groups and that gives you 5 winners. '''Sixth race:''' Now race 5 of them that will give you winner and wh...")
- 12:21, 1 September 2020 Algowikiadmin talk contribs created page 1.31 (Created page with "Back to Chapter 1.")
- 12:20, 1 September 2020 Algowikiadmin talk contribs created page 1.19 (Created page with "<b>Step 1:</b> Show that the statement holds for the basis case <math>n = 1</math><br> :<math>E(n) = n - 1</math><br> :<math>E(1) = 1 - 1 = 0</math>. A tree with one node has...")
- 12:19, 1 September 2020 Algowikiadmin talk contribs created page 1.17 (Created page with "<b>Step 1:</b> Show that the statement holds for the basis case <math>n = 1</math><br> :<math>\frac {1}{i(i+1)} = \frac {n}{n+1}</math><br><br> :<math>\frac {1}{1(1+1)} = \fr...")
- 12:18, 1 September 2020 Algowikiadmin talk contribs created page 1.15 (Created page with "Call the statement <math>S_n</math> and the general term <math>a_n</math><br> <b>Step 1:</b> Show that the statement holds for the basis case <math>n = 0</math><br> :<math>a...")
- 12:18, 1 September 2020 Algowikiadmin talk contribs created page 1.13 (Created page with "The basis case is when <math>n = 0</math><br> :<math>\sum_{i=1}^0 i^2 = 0^2 = 0 </math><br> and using <math>n=0</math> in the formula <math>\frac {n(n + 1)(2 \cdot n + 1)} {6}...")
- 12:15, 1 September 2020 Algowikiadmin talk contribs created page 1.27 (Created page with "Return to Chapter 1.")
- 12:07, 1 September 2020 Algowikiadmin talk contribs created page 1.29 (Created page with "1. If there are 10 times as many items, and it is proportional to <math>n^2</math>, it will take <math>10^2</math> times as long or 100 seconds. 2. If it proportional to <math...")
- 12:06, 1 September 2020 Algowikiadmin talk contribs created page 1.25 (Created page with "I estimate the mouth of the Mississippi at 1 mile wide and 100 feet, or 0.02 miles, deep. If the water were moving at 10 miles an hour, that means that 10 miles x 0.02 miles x...")
- 12:04, 1 September 2020 Algowikiadmin talk contribs created page 1.23 (Created page with "1 million seconds = 277.777778 hours 1 million seconds = 11.5740741 days ---- Possible approach: a) There are 3600s in an hour b) Eliminating the thousands, we get 1000...")
- 12:03, 1 September 2020 Algowikiadmin talk contribs created page 1.21 (Created page with "Back to Chapter 1.")
- 12:02, 1 September 2020 Algowikiadmin talk contribs created page 1.11 (Created page with "Back to Chapter 1.")
- 12:01, 1 September 2020 Algowikiadmin talk contribs created page 1.9 (Created blank page)
- 20:11, 31 August 2020 Algowikiadmin talk contribs created page 1.7 (Created page with "Please add proposed solutions to the question here.")
- 20:10, 31 August 2020 Algowikiadmin talk contribs created page 1.5 (Created page with "<p>First-fit algorithm counterexample:</p> <p> <math>S = \{1, 2, 3\}</math> <br/> <math>T = 5</math> </p> <p>Best-fit algorithm counterexample:</p> <p> <math>S = \{1, 2, 3\}<...")
- 20:09, 31 August 2020 Algowikiadmin talk contribs created page 1.3 (Created page with " a ----------- c ----------- b \ / \--------- d ---------- / If the distance from ''a'' to ''b'' going through ''d'' is less than the dista...")
- 20:35, 23 August 2020 Algowikiadmin talk contribs created page 1.1 (Created page with "''a'' + ''b'' < min(''a,b'') <-> ''a'' < 0 /\ ''b'' < 0 ---- If both ''a'' and ''b'' are negative, ''a'' + ''b''< min(''a, b''). For example ''a'' = -5 ''b'' =...")
- 19:36, 23 August 2020 Algowikiadmin talk contribs created page Chapter 12 (Created page with "Problems Back to Chapter List")
- 19:36, 23 August 2020 Algowikiadmin talk contribs created page Chapter 11 (Created page with "Problems Back to Chapter List")
- 19:35, 23 August 2020 Algowikiadmin talk contribs created page Chapter 10 (Created page with "Problems Back to Chapter List")
- 19:35, 23 August 2020 Algowikiadmin talk contribs created page Chapter 9 (Created page with "Problems Back to Chapter List")
- 19:35, 23 August 2020 Algowikiadmin talk contribs created page Chapter 8 (Created page with "Problems Back to Chapter List")
- 19:35, 23 August 2020 Algowikiadmin talk contribs created page Chapter 7 (Created page with "Problems Back to Chapter List")
- 19:35, 23 August 2020 Algowikiadmin talk contribs created page Chapter 6 (Created page with "Problems Back to Chapter List")
- 19:34, 23 August 2020 Algowikiadmin talk contribs created page Chapter 5 (Created page with "Problems Back to Chapter List")
- 19:34, 23 August 2020 Algowikiadmin talk contribs created page Chapter 4 (Created page with "Problems Back to Chapter List")