{"id":17129555,"url":"https://github.com/mrekucci/epi","last_synced_at":"2025-04-05T14:07:20.814Z","repository":{"id":34285776,"uuid":"38174748","full_name":"mrekucci/epi","owner":"mrekucci","description":"Solutions for Elements of Programming Interviews problems written in Golang (work-in-progress)","archived":false,"fork":false,"pushed_at":"2022-06-07T13:15:34.000Z","size":267,"stargazers_count":510,"open_issues_count":1,"forks_count":99,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-01-25T01:09:09.015Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrekucci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-27T20:45:44.000Z","updated_at":"2024-01-14T11:34:59.000Z","dependencies_parsed_at":"2022-09-14T19:41:03.978Z","dependency_job_id":null,"html_url":"https://github.com/mrekucci/epi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrekucci%2Fepi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrekucci%2Fepi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrekucci%2Fepi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrekucci%2Fepi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrekucci","download_url":"https://codeload.github.com/mrekucci/epi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345853,"owners_count":20924102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T19:09:55.491Z","updated_at":"2025-04-05T14:07:20.797Z","avatar_url":"https://github.com/mrekucci.png","language":"Go","funding_links":[],"categories":["Programming Languages/Frameworks/Platforms","🌏 Frameworks"],"sub_categories":["Golang"],"readme":"epi\n===\n\n[![Build Status](https://travis-ci.org/mrekucci/epi.svg)](https://travis-ci.org/mrekucci/epi)\n[![Coverage Status](https://coveralls.io/repos/mrekucci/epi/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/mrekucci/epi?branch=master)\n[![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE.txt)\n\nThis is a work-in-progress, solutions for [Elements of Programming Interviews][1] problems written in Golang.\n\nSolutions\n=========\n\nPrimitive Types\n---------------\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Computing the parity of a word][2]                                      | [tests][3]   |    ✓    |\n| [Swap bits][4]                                                           | [tests][5]   |    ✓    |\n| [Reverse bits][6]                                                        | [tests][7]   |    ✓    |\n| [Find a closest integer with the same weight][8]                         | [tests][9]   |    ✓    |\n| [Compute *x × y* without arithmetical operators][10]                     | [tests][11]  |         |\n| [Compute *x/y*][12]                                                      | [tests][13]  |         |\n| [Compute *x^y*][14]                                                      | [tests][15]  |         |\n| [Reverse digits][16]                                                     | [tests][17]  |    ✓    |\n| [Check if a decimal integer is a palindrome][18]                         | [tests][19]  |         |\n| [Generate uniform random numbers][20]                                    | [tests][21]  |         |\n| [Rectangle intersection][22]                                             | [tests][23]  |         |\n\nArrays\n------\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [The Dutch national flag problem][24]                                    | [tests][25]  |    ✓    |\n| [Increment an arbitrary-precision integer][26]                           | [tests][27]  |         |\n| [Multiply two arbitrary-precision integers][28]                          | [tests][29]  |         |\n| [Advancing through an array][30]                                         | [tests][31]  |         |\n| [Delete a key from an array][32]                                         | [tests][33]  |         |\n| [Delete duplicates from a sorted array][34]                              | [tests][35]  |    ✓    |\n| [Robot's minimum battery capacity][36]                                   | [tests][37]  |    ✓    | \u003c!-- Rename to: \"Buy and sell a stock once\"  and fix code according to: https://github.com/epibook/epibook.github.io/commit/44f09980c4039b7a7b3eb5200c6994631e543c7a --\u003e\n| [Buy and sell a stock twice][38]                                         | [tests][39]  |         |\n| [Enumerate all primes to *n*][40]                                        | [tests][41]  |    ✓    |\n| [Permute the elements of an array][42]                                   | [tests][43]  |         |\n| [Compute the next permutation][44]                                       | [tests][45]  |    ✓    |\n| [Sample offline data][46]                                                | [tests][47]  |         |\n| [Sample online data][48]                                                 | [tests][49]  |         |\n| [Compute a random permutation][50]                                       | [tests][51]  |         |\n| [Compute a random subset][52]                                            | [tests][53]  |         |\n| [Generate nonuniform random numbers][54]                                 | [tests][55]  |         |\n| [The Sudoku checker problem][56]                                         | [tests][57]  |         |\n| [Compute the spiral ordering of a 2D array][58]                          | [tests][59]  |    ✓    |\n| [Rotate a 2D array][60]                                                  | [tests][61]  |         |\n| [Compute rows in Pascal’s Triangle][62]                                    | [tests][63]  |         |\n\nStrings\n-------\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Interconvert strings and integers][64]                                  | [tests][65]  |    ✓    |\n| [Base conversion][66]                                                    | [tests][67]  |         |\n| [Compute the spreadsheet column encoding][68]                            | [tests][69]  |         |\n| [Replace and remove][70]                                                 | [tests][71]  |         |\n| [Test palindromicity][72]                                                | [tests][73]  |         |\n| [Reverse all the words in a sentence][74]                                | [tests][75]  |    ✓    |\n| [Compute all mnemonics for a phone number][76]                           | [tests][77]  |    ✓    |\n| [The look-and-say problem][78]                                           | [tests][79]  |         |\n| [Convert from Roman to decimal][80]                                      | [tests][81]  |         |\n| [Compute all valid IP addresses][82]                                     | [tests][83]  |         |\n| [Write a string sinusoidally][84]                                        | [tests][85]  |         |\n| [Implement run-length encoding][86]                                      | [tests][87]  |    ✓    |\n| [Implement the UNIX `tail` command][88]                                  | [tests][89]  |         |\n| [Find the first occurrence of a substring][90]                           | [tests][91]  |    ✓    |\n\nLinked List\n-----------\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Merge two sorted lists][92]                                             | [tests][93]  |    ✓    |\n| [Reverse a singly linked list][94]                                       | [tests][95]  |         |\n| [Reverse a single sublist][96]                                           | [tests][97]  |         |\n| [Test for cyclicity][98]                                                 | [tests][99]  |    ✓    |\n| [Test for overlapping lists—lists are cycle-free][100]                     | [tests][101] |         |\n| [Test for overlapping lists—lists may have cycles][102]                    | [tests][103] |         |\n| [Delete a node from a singly linked list][104]                           | [tests][105] |         |\n| [Remove the *k*th last element from a list][106]                         | [tests][107] |         |\n| [Remove duplicates from a sorted list][108]                              | [tests][109] |         |\n| [Implement cyclic right shift for singly linked lists][110]              | [tests][111] |         |\n| [Implement even-odd merge][112]                                          | [tests][113] |         |\n| [Test whether a singly linked list is palindromic][114]                  | [tests][115] |         |\n| [Implement list pivoting][116]                                           | [tests][117] |         |\n| [Add list-based integers][118]                                           | [tests][119] |         |\n\nStacks and Queues\n-----------------\n\n### Stacks\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Implement a stack with max API][120]                                    | [tests][121] |    ✓    |\n| [Evaluate RPN expressions][122]                                          | [tests][123] |    ✓    |\n| [Test a string over “{,},(,),[,]” for well-formedness][124]                | [tests][125] |    ✓    |\n| [Normalize pathnames][126]                                               | [tests][127] |         |\n| [BST keys in sort order][128]                                            | [tests][129] |         |\n| [Search a postings list][130]                                            | [tests][131] |         |\n| [Compute buildings with a sunset view][132]                              | [tests][133] |         |\n| [Sort a stack][134]                                                      | [tests][135] |         |\n\n### Queues\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Compute binary tree nodes in order of increasing depth][136]            | [tests][137] |    ✓    |\n| [Implement a circular queue][138]                                        | [tests][139] |    ✓    |\n| [Implement a queue using stacks][140]                                    | [tests][141] |    ✓    |\n| [Implement a queue with max API][142]                                    | [tests][143] |         |\n\nBinary Trees\n------------\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Test if a binary tree is balanced][144]                                 | [tests][145] |    ✓    |\n| [Test if a binary tree is symmetric][146]                                | [tests][147] |    ✓    |\n| [Compute the lowest common ancestor in a binary tree][148]               | [tests][149] |    ✓    |\n| [Compute the LCA when nodes have parent pointers][150]                   | [tests][151] |         |\n| [Sum the root-to-leaf paths in a binary tree][152]                       | [tests][153] |         |\n| [Find a root to leaf path with specified sum][154]                       | [tests][155] |         |\n| [Compute the *k*th node in an inorder traversal][156]                    | [tests][157] |         |\n| [Compute the successor][158]                                             | [tests][159] |         |\n| [Implement an inorder traversal with *O(1)* space][160]                  | [tests][161] |    ✓    |\n| [Reconstruct a binary tree from traversal data][162]                     | [tests][163] |         |\n| [Reconstruct a binary tree from a preorder traversal with markers][164]  | [tests][165] |         |\n| [Form a linked list from the leaves of a binary tree][166]               | [tests][167] |         |\n| [Compute the exterior of a binary tree][168]                             | [tests][169] |         |\n| [Compute the right sibling tree][170]                                    | [tests][171] |         |\n| [Implement locking in a binary tree][172]                                | [tests][173] |         |\n\nHeaps\n-----\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Merge sorted files][174]                                                | [tests][175] |    ✓    |\n| [Sort an increasing-decreasing array][176]                               | [tests][177] |    ✓    |\n| [Sort an almost-sorted array][178]                                       | [tests][179] |         |\n| [Compute the *k* closest stars][180]                                     | [tests][181] |         |\n| [Compute the median of online data][182]                                 | [tests][183] |    ✓    |\n| [Compute the *k* largest elements in a max-heap][184]                    | [tests][185] |         |\n| [Implement a stack API using a heap][186]                                | [tests][187] |         |\n\nSearching\n---------\n\n### Binary Search\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Search a sorted array for first occurrence of *k*][188]                 | [tests][189] |    ✓    |\n| [Search a sorted array for the first element greater than *k*][190]      | [tests][191] |    ✓    |\n| [Search a sorted array for entry equal to its index][192]                | [tests][193] |    ✓    |\n| [Search a cyclically sorted array][194]                                  | [tests][195] |         |\n| [Compute the integer square root][196]                                   | [tests][197] |         |\n| [Compute the real square root][198]                                      | [tests][199] |    ✓    |\n\n### Generalized Search\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Search in a 2D sorted array][200]                                       | [tests][201] |    ✓    |\n| [Find the min and max simultaneously][202]                               | [tests][203] |    ✓    |\n| [Find the *k*th largest element][204]                                    | [tests][205] |    ✓    |\n| [Compute the optimum mailbox placement][206]                             | [tests][207] |         |\n| [Find the missing IP address][208]                                       | [tests][209] |         |\n| [Find the duplicate and missing elements][210]                           | [tests][211] |         |\n\nHash Tables\n-----------\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Partition into anagrams][212]                                           | [tests][213] |    ✓    |\n| [Test for palindromic permutations][214]                                 | [tests][215] |    ✓    |\n| [Is an anonymous letter constructible?][216]                             | [tests][217] |    ✓    |\n| [Implement an ISBN cache][218]                                           | [tests][219] |         |\n| [Compute the LCA, optimizing for close ancestors][220]                   | [tests][221] |    ✓    |\n| [Compute the *k* most frequent queries][222]                             | [tests][223] |         |\n| [Find the nearest repeated entries in an array][224]                     | [tests][225] |         |\n| [Find the smallest subarray covering all values][226]                    | [tests][227] |    ✓    |\n| [Find smallest subarray sequentially covering all values][228]           | [tests][229] |         |\n| [Find the longest subarray with distinct entries][230]                   | [tests][231] |         |\n| [Find the length of a longest contained range][232]                      | [tests][233] |         |\n| [Compute the average of the top three scores][234]                       | [tests][235] |         |\n| [Compute all string decompositions][236]                                 | [tests][237] |         |\n| [Find a highest affinity pair][238]                                      | [tests][239] |         |\n| [Test the Collatz conjecture][240]                                       | [tests][241] |         |\n| [Implement a hash function for chess][242]                               | [tests][243] |         |\n\nSorting\n-------\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Compute the intersection of two sorted arrays][244]                     | [tests][245] |    ✓    |\n| [Implement mergesort in-place][246]                                      | [tests][247] |    ✓    |\n| [Count the frequencies of characters in a sentence][248]                 | [tests][249] |    ✓    |\n| [Find unique elements][250]                                              | [tests][251] |         |\n| [Render a calendar][252]                                                 | [tests][253] |         |\n| [Sets of disjoint intervals][254]                                        | [tests][255] |         |\n| [Compute the union of intervals][256]                                    | [tests][257] |    ✓    |\n| [Partitioning and sorting an array with many repeated entries][258]      | [tests][259] |         |\n| [Team photo day—1][260]                                                    | [tests][261] |         |\n| [Implement a fast sorting algorithm for lists][262]                      | [tests][263] |    ✓    |\n| [Compute a salary threshold][264]                                        | [tests][265] |         |\n\nBinary Search Trees\n-------------------\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Test if a binary tree satisfies the BST property][266]                  | [tests][267] |    ✓    |\n| [Find the first occurrence of a key in a BST][268]                       | [tests][269] |    ✓    |\n| [Find the first key larger than a given value in a BST][270]             | [tests][271] |    ✓    |\n| [Find the *k* largest elements in a BST][272]                            | [tests][273] |         |\n| [Compute the LCA in a BST][274]                                          | [tests][275] |         |\n| [Reconstruct a BST from traversal data][276]                             | [tests][277] |         |\n| [Find the closest entries in three sorted arrays][278]                   | [tests][279] |         |\n| [Enumerate numbers of the form *a + b√2*][280]                           | [tests][281] |         |\n| [The most visited pages problem][282]                                    | [tests][283] |         |\n| [Build a minimum height BST from a sorted array][284]                    | [tests][285] |         |\n| [Insertion and deletion in a BST][286]                                   | [tests][287] |         |\n| [Test if three BST nodes are totally ordered][288]                       | [tests][289] |         |\n| [The range lookup problem][290]                                          | [tests][291] |         |\n| [Add credits][292]                                                       | [tests][293] |         |\n| [Count the number of entries in an interval][294]                        | [tests][295] |         |\n\nRecursion\n---------\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [The Tower of Hanoi problem][296]                                        | [tests][297] |    ✓    |\n| [Generate all nonattacking placements of *n*-Queens][298]                | [tests][299] |    ✓    |\n| [Generate permutations][300]                                             | [tests][301] |    ✓    |\n| [Generate the power set][302]                                            | [tests][303] |    ✓    |\n| [Generate all subsets of size *k*][304]                                  | [tests][305] |    ✓    |\n| [Generate strings of matched parens][306]                                | [tests][307] |         |\n| [Generate palindromic decompositions][308]                               | [tests][309] |         |\n| [Generate binary trees][310]                                             | [tests][311] |         |\n| [Implement a Sudoku solver][312]                                         | [tests][313] |    ✓    |\n| [Compute a Gray code][314]                                               | [tests][315] |         |\n| [Compute the diameter of a tree][316]                                    | [tests][317] |         |\n\nDynamic Programming\n-------------------\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Count the number of score combinations][318]                            | [tests][319] |         |\n| [Compute the Levenshtein distance][320]                                  | [tests][321] |         |\n| [Count the number of ways to traverse a 2D array][322]                   | [tests][323] |         |\n| [Plan a fishing trip][324]                                               | [tests][325] |         |\n| [Search for a sequence in a 2D array][326]                               | [tests][327] |         |\n| [The knapsack problem][328]                                              | [tests][329] |         |\n| [Divide the spoils fairly][330]                                          | [tests][331] |         |\n| [The **bedbathandbeyond.com** problem][332]                              | [tests][333] |         |\n| [Find the minimum weight path in a triangle][334]                        | [tests][335] |         |\n| [Pick up coins for maximum gain][336]                                    | [tests][337] |         |\n| [Count the number of moves to climb stairs][338]                         | [tests][339] |         |\n| [Compute the probability of a Republican majority][340]                  | [tests][341] |         |\n| [The pretty printing problem][342]                                       | [tests][343] |         |\n| [Find the longest nondecreasing subsequence][344]                        | [tests][345] |         |\n\nGreedy Algorithms and Invariants\n--------------------------------\n\n### Greedy Algorithms\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Implement Huffman coding][346]                                          | [tests][347] |    ✓    |\n| [Compute an optimum assignment of tasks][348]                            | [tests][349] |    ✓    |\n| [Implement a schedule which minimizes waiting time][350]                 | [tests][351] |    ✓    |\n| [The interval covering problem][352]                                     | [tests][353] |         |\n\n### Invariants\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [The 3-sum problem][354]                                                 | [tests][355] |    ✓    |\n| [Find the majority element][356]                                         | [tests][357] |         |\n| [The gasup problem][358]                                                 | [tests][359] |         |\n| [Compute the maximum water trapped by a pair of vertical lines][360]     | [tests][361] |         |\n| [Compute the largest rectangle under the skyline][362]                   | [tests][363] |         |\n\nGraphs\n------\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Identify the celebrity][364]                                            | [tests][365] |    ✓    |\n| [Search a maze][366]                                                     | [tests][367] |    ✓    |\n| [Paint a Boolean matrix][368]                                            | [tests][369] |    ✓    |\n| [Compute enclosed regions][370]                                          | [tests][371] |         |\n| [Degrees of connectedness—1][372]                                          | [tests][373] |    ✓    |\n| [Clone a graph][374]                                                     | [tests][375] |         |\n| [Making wired connections][376]                                          | [tests][377] |         |\n| [Transform one string to another][378]                                   | [tests][379] |         |\n| [The shortest straight-line program for *x^n*][380]                      | [tests][381] |         |\n| [Team photo day—2][382]                                                    | [tests][383] |         |\n| [Compute a shortest path with fewest edges][384]                         | [tests][385] |         |\n\nParallel Computing\n------------------\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Implement caching for a multithreaded dictionary][386]                  | [tests][387] |         |\n| [Analyze two unsynchronized interleaved threads][388]                    | [tests][389] |         |\n| [Implement synchronization for two interleaving threads][390]            | [tests][391] |         |\n| [Implement a thread pool][392]                                           | [tests][393] |         |\n| [Implement asynchronous callbacks][394]                                  | [tests][395] |         |\n| [Implement a Timer class][396]                                           | [tests][397] |         |\n| [The readers-writers problem][398]                                       | [tests][399] |         |\n| [The readers-writers problem with write preference][400]                 | [tests][401] |         |\n| [Test the Collatz conjecture in parallel][402]                           | [tests][403] |         |\n| [Design TeraSort and PetaSort][404]                                      | [tests][405] |         |\n| [Implement distributed throttling][406]                                  | [tests][407] |         |\n\nDesign Problems\n---------------\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Design a spell checker][408]                                            | [tests][409] |         |\n| [Design a solution to the stemming problem][410]                         | [tests][411] |         |\n| [Plagiarism detector][412]                                               | [tests][413] |         |\n| [Pair users by attributes][414]                                          | [tests][415] |         |\n| [Design a system for detecting copyright infringement][416]              | [tests][417] |         |\n| [Design *TEX*][418]                                                      | [tests][419] |         |\n| [Design a search engine][420]                                            | [tests][421] |         |\n| [Implement PageRank][422]                                                | [tests][423] |         |\n| [Design a scalable priority system][424]                                 | [tests][425] |         |\n| [Create photomosaics][426]                                               | [tests][427] |         |\n| [Implement Mileage Run][428]                                             | [tests][429] |         |\n| [Implement Connexus][430]                                                | [tests][431] |         |\n| [Design an online advertising system][432]                               | [tests][433] |         |\n| [Design a recommendation system][434]                                    | [tests][435] |         |\n| [Design an optimized way of distributing large files][436]               | [tests][437] |         |\n| [Design the World Wide Web][438]                                         | [tests][439] |         |\n| [Estimate the hardware cost of a photo sharing app][440]                 | [tests][441] |         |\n\nHonors Class\n------------\n\n| Problem                                                                  | Test         | Solved  |\n|--------------------------------------------------------------------------|:------------:|:-------:|\n| [Compute the greatest common divisor][442]                               | [tests][443] |         |\n| [Find the first missing positive entry][444]                             | [tests][445] |         |\n| [Buy and sell a stock *k* times][446]                                    | [tests][447] |         |\n| [Compute the maximum product of all entries but one][448]                | [tests][449] |         |\n| [Compute the longest contiguous increasing subarray][450]                | [tests][451] |         |\n| [Rotate an array][452]                                                   | [tests][453] |         |\n| [Identify positions attacked by rooks][454]                              | [tests][455] |         |\n| [Justify text][456]                                                      | [tests][457] |         |\n| [Reverse sublists *k* at a time][458]                                    | [tests][459] |         |\n| [Implement list zipping][460]                                            | [tests][461] |         |\n| [Copy a postings list][462]                                              | [tests][463] |         |\n| [Compute the median of a sorted circular linked list][464]               | [tests][465] |    ✓    |\n| [Compute the longest substring with matching parens][466]                | [tests][467] |         |\n| [Compute the maximum of a sliding window][468]                           | [tests][469] |         |\n| [Implement preorder and postorder traversals without recursion][470]     | [tests][471] |         |\n| [Compute fair bonuses][472]                                              | [tests][473] |         |\n| [Find *k* elements closest to the median][474]                           | [tests][475] |         |\n| [Search a sorted array of unknown length][476]                           | [tests][477] |         |\n| [Search in two sorted arrays][478]                                       | [tests][479] |         |\n| [Find the *k*th largest element—large *n*, small *k*][480]               | [tests][481] |         |\n| [Find an element that appears only once][482]                            | [tests][483] |         |\n| [Find the line through the most points][484]                             | [tests][485] |         |\n| [Find the shortest unique prefix][486]                                   | [tests][487] |         |\n| [Compute the smallest nonconstructible change][488]                      | [tests][489] |         |\n| [Find the most visited pages in a window][490]                           | [tests][491] |         |\n| [Convert a sorted doubly linked list into a BST][492]                    | [tests][493] |         |\n| [Convert a BST to a sorted doubly linked list][494]                      | [tests][495] |         |\n| [Merge two BSTs][496]                                                    | [tests][497] |         |\n| [Test if a binary tree is an almost BST][498]                            | [tests][499] |         |\n| [The view from above][500]                                               | [tests][501] |         |\n| [Searching a min-first BST][502]                                         | [tests][503] |         |\n| [Implement regular expression matching][504]                             | [tests][505] |         |\n| [Synthesize an expression][506]                                          | [tests][507] |         |\n| [Count inversions][508]                                                  | [tests][509] |         |\n| [Draw the skyline][510]                                                  | [tests][511] |         |\n| [Find the two closest points][512]                                       | [tests][513] |         |\n| [Measure with defective jugs][514]                                       | [tests][515] |         |\n| [Compute the maximum subarray sum in a circular array][516]              | [tests][517] |         |\n| [Determine the critical height][518]                                     | [tests][519] |         |\n| [Voltage selection in a logic circuit][520]                              | [tests][521] |         |\n| [Find the maximum 2D subarray][522]                                      | [tests][523] |         |\n| [Trapping water][524]                                                    | [tests][525] |         |\n| [Load balancing][526]                                                    | [tests][527] |         |\n| [Search for a pair-sum in an abs-sorted array][528]                      | [tests][529] |         |\n| [The heavy hitter problem][530]                                          | [tests][531] |         |\n| [Find the longest subarray whose sum ≤ *k*][532]                          | [tests][533] |         |\n| [Degrees of connectedness—2][534]                                          | [tests][535] |         |\n| [Compute a minimum delay schedule, unlimited resources][536]             | [tests][537] |         |\n| [Road network][538]                                                      | [tests][539] |         |\n| [Test if arbitrage is possible][540]                                     | [tests][541] |         |\n| [The readers-writers problem with fairness][542]                         | [tests][543] |         |\n| [Implement a producer-consumer queue][544]                               | [tests][545] |         |\n\n[1]:   http://elementsofprogramminginterviews.com\n[2]:   ptypes/parity.go\n[3]:   ptypes/parity_test.go\n[4]:   ptypes/swapbits.go\n[5]:   ptypes/swapbits_test.go\n[6]:   ptypes/reversebits.go\n[7]:   ptypes/reversebits_test.go\n[8]:   ptypes/closestint.go\n[9]:   ptypes/closestint_test.go\n[10]:  in_progress.md\n[11]:  in_progress.md\n[12]:  in_progress.md\n[13]:  in_progress.md\n[14]:  in_progress.md\n[15]:  in_progress.md\n[16]:  ptypes/reverseint.go\n[17]:  ptypes/reverseint_test.go\n[18]:  in_progress.md\n[19]:  in_progress.md\n[20]:  in_progress.md\n[21]:  in_progress.md\n[22]:  in_progress.md\n[23]:  in_progress.md\n[24]:  arrays/dutchflag.go\n[25]:  arrays/dutchflag_test.go\n[26]:  in_progress.md\n[27]:  in_progress.md\n[28]:  in_progress.md\n[29]:  in_progress.md\n[30]:  in_progress.md\n[31]:  in_progress.md\n[32]:  in_progress.md\n[33]:  in_progress.md\n[34]:  arrays/duplicates.go\n[35]:  arrays/duplicates_test.go\n[36]:  arrays/maxdiff.go\n[37]:  arrays/maxdiff_test.go\n[38]:  in_progress.md\n[39]:  in_progress.md\n[40]:  arrays/enumprimes.go\n[41]:  arrays/enumprimes_test.go\n[42]:  in_progress.md\n[43]:  in_progress.md\n[44]:  arrays/nextperm.go\n[45]:  arrays/nextperm_test.go\n[46]:  in_progress.md\n[47]:  in_progress.md\n[48]:  in_progress.md\n[49]:  in_progress.md\n[50]:  in_progress.md\n[51]:  in_progress.md\n[52]:  in_progress.md\n[53]:  in_progress.md\n[54]:  in_progress.md\n[55]:  in_progress.md\n[56]:  in_progress.md\n[57]:  in_progress.md\n[58]:  arrays/spiralmetrix.go\n[59]:  arrays/spiralmetrix_test.go\n[60]:  in_progress.md\n[61]:  in_progress.md\n[62]:  in_progress.md\n[63]:  in_progress.md\n[64]:  strings/intstrconv.go\n[65]:  strings/intstrconv_test.go\n[66]:  in_progress.md\n[67]:  in_progress.md\n[68]:  in_progress.md\n[69]:  in_progress.md\n[70]:  in_progress.md\n[71]:  in_progress.md\n[72]:  in_progress.md\n[73]:  in_progress.md\n[74]:  strings/reversewords.go\n[75]:  strings/reversewords_test.go\n[76]:  strings/phonemnemo.go\n[77]:  strings/phonemnemo_test.go\n[78]:  in_progress.md\n[79]:  in_progress.md\n[80]:  in_progress.md\n[81]:  in_progress.md\n[82]:  in_progress.md\n[83]:  in_progress.md\n[84]:  in_progress.md\n[85]:  in_progress.md\n[86]:  strings/rlecompr.go\n[87]:  strings/rlecompr_test.go\n[88]:  in_progress.md\n[89]:  in_progress.md\n[90]:  strings/index.go\n[91]:  strings/index_test.go\n[92]:  lists/mergesorted.go\n[93]:  lists/mergesorted_test.go\n[94]:  in_progress.md\n[95]:  in_progress.md\n[96]:  in_progress.md\n[97]:  in_progress.md\n[98]:  lists/checkcycle.go\n[99]:  lists/checkcycle_test.go\n[100]: in_progress.md\n[101]: in_progress.md\n[102]: in_progress.md\n[103]: in_progress.md\n[104]: in_progress.md\n[105]: in_progress.md\n[106]: in_progress.md\n[107]: in_progress.md\n[108]: in_progress.md\n[109]: in_progress.md\n[110]: in_progress.md\n[111]: in_progress.md\n[112]: lists/evenoddmerge.go\n[113]: lists/evenoddmerge_test.go\n[114]: in_progress.md\n[115]: in_progress.md\n[116]: in_progress.md\n[117]: in_progress.md\n[118]: in_progress.md\n[119]: in_progress.md\n[120]: stacks/max.go\n[121]: stacks/max_test.go\n[122]: stacks/eval.go\n[123]: stacks/eval_test.go\n[124]: stackt/wellformed.go\n[125]: stackt/wellformed_test.go\n[126]: in_progress.md\n[127]: in_progress.md\n[128]: in_progress.md\n[129]: in_progress.md\n[130]: in_progress.md\n[131]: in_progress.md\n[132]: in_progress.md\n[133]: in_progress.md\n[134]: in_progress.md\n[135]: in_progress.md\n[136]: queues/btorder.go\n[137]: queues/btorder_test.go\n[138]: queues/circqueue.go\n[139]: queues/circqueue_test.go\n[140]: queues/stackqueue.go\n[141]: queues/stackqueue_test.go\n[142]: in_progress.md\n[143]: in_progress.md\n[144]: btrees/balanced.go\n[145]: btrees/balanced_test.go\n[146]: btrees/symmetric.go\n[147]: btrees/symmetric_test.go\n[148]: btrees/lca.go\n[149]: btrees/lca_test.go\n[150]: in_progress.md\n[151]: in_progress.md\n[152]: in_progress.md\n[153]: in_progress.md\n[154]: in_progress.md\n[155]: in_progress.md\n[156]: in_progress.md\n[157]: in_progress.md\n[158]: in_progress.md\n[159]: in_progress.md\n[160]: btrees/traversal.go\n[161]: btrees/traversal_test.go\n[162]: in_progress.md\n[163]: in_progress.md\n[164]: in_progress.md\n[165]: in_progress.md\n[166]: in_progress.md\n[167]: in_progress.md\n[168]: in_progress.md\n[169]: in_progress.md\n[170]: in_progress.md\n[171]: in_progress.md\n[172]: in_progress.md\n[173]: in_progress.md\n[174]: heaps/mergesorted.go\n[175]: heaps/mergesorted_test.go\n[176]: heaps/sortk.go\n[177]: heaps/sortk_test.go\n[178]: in_progress.md\n[179]: in_progress.md\n[180]: in_progress.md\n[181]: in_progress.md\n[182]: heaps/median.go\n[183]: heaps/median_test.go\n[184]: in_progress.md\n[185]: in_progress.md\n[186]: in_progress.md\n[187]: in_progress.md\n[188]: bsearch/firstk.go\n[189]: bsearch/firstk_test.go\n[190]: bsearch/greaterk.go\n[191]: bsearch/greaterk_test.go\n[192]: bsearch/equals.go\n[193]: bsearch/equals_test.go\n[194]: in_progress.md\n[195]: in_progress.md\n[196]: in_progress.md\n[197]: in_progress.md\n[198]: bsearch/sqrtreal.go\n[199]: bsearch/sqrtreal_test.go\n[200]: search/matrix.go\n[201]: search/matrix_test.go\n[202]: search/minmax.go\n[203]: search/minmax_test.go\n[204]: search/largestkth.go\n[205]: search/largestkth_test.go\n[206]: in_progress.md\n[207]: in_progress.md\n[208]: in_progress.md\n[209]: in_progress.md\n[210]: in_progress.md\n[211]: in_progress.md\n[212]: htables/anagram.go\n[213]: htables/anagram_test.go\n[214]: htables/palindrom.go\n[215]: htables/palindrom_test.go\n[216]: htables/letter.go\n[217]: htables/letter_test.go\n[218]: in_progress.md\n[219]: in_progress.md\n[220]: htables/lca.go\n[221]: htables/lca_test.go\n[222]: in_progress.md\n[223]: in_progress.md\n[224]: in_progress.md\n[225]: in_progress.md\n[226]: htables/smallestsubarray.go\n[227]: htables/smallestsubarray_test.go\n[228]: in_progress.md\n[229]: in_progress.md\n[230]: in_progress.md\n[231]: in_progress.md\n[232]: in_progress.md\n[233]: in_progress.md\n[234]: in_progress.md\n[235]: in_progress.md\n[236]: in_progress.md\n[237]: in_progress.md\n[238]: in_progress.md\n[239]: in_progress.md\n[240]: in_progress.md\n[241]: in_progress.md\n[242]: in_progress.md\n[243]: in_progress.md\n[244]: sorting/intersection.go\n[245]: sorting/intersection_test.go\n[246]: sorting/merge.go\n[247]: sorting/merge_test.go\n[248]: sorting/charfreq.go\n[249]: sorting/charfreq_test.go\n[250]: in_progress.md\n[251]: in_progress.md\n[252]: in_progress.md\n[253]: in_progress.md\n[254]: in_progress.md\n[255]: in_progress.md\n[256]: sorting/union.go\n[257]: sorting/union_test.go\n[258]: in_progress.md\n[259]: in_progress.md\n[260]: in_progress.md\n[261]: in_progress.md\n[262]: sorting/sortlist.go\n[263]: sorting/sortlist_test.go\n[264]: in_progress.md\n[265]: in_progress.md\n[266]: bstrees/property.go\n[267]: bstrees/property_test.go\n[268]: bstrees/firstk.go\n[269]: bstrees/firstk_test.go\n[270]: bstrees/greaterk.go\n[271]: bstrees/greaterk_test.go\n[272]: in_progress.md\n[273]: in_progress.md\n[274]: in_progress.md\n[275]: in_progress.md\n[276]: in_progress.md\n[277]: in_progress.md\n[278]: in_progress.md\n[279]: in_progress.md\n[280]: in_progress.md\n[281]: in_progress.md\n[282]: in_progress.md\n[283]: in_progress.md\n[284]: in_progress.md\n[285]: in_progress.md\n[286]: in_progress.md\n[287]: in_progress.md\n[288]: in_progress.md\n[289]: in_progress.md\n[290]: in_progress.md\n[291]: in_progress.md\n[292]: in_progress.md\n[293]: in_progress.md\n[294]: in_progress.md\n[295]: in_progress.md\n[296]: recursion/hanoitowers.go\n[297]: recursion/hanoitowers_test.go\n[298]: recursion/nqueens.go\n[299]: recursion/nqueens_test.go\n[300]: recursion/perm.go\n[301]: recursion/perm_test.go\n[302]: recursion/powerset.go\n[303]: recursion/powerset_test.go\n[304]: recursion/subsets.go\n[305]: recursion/subsets_test.go\n[306]: in_progress.md\n[307]: in_progress.md\n[308]: in_progress.md\n[309]: in_progress.md\n[310]: in_progress.md\n[311]: in_progress.md\n[312]: recursion/sudoku.go\n[313]: recursion/sudoku_test.go\n[314]: in_progress.md\n[315]: in_progress.md\n[316]: in_progress.md\n[317]: in_progress.md\n[318]: in_progress.md\n[319]: in_progress.md\n[320]: in_progress.md\n[321]: in_progress.md\n[322]: in_progress.md\n[323]: in_progress.md\n[324]: in_progress.md\n[325]: in_progress.md\n[326]: in_progress.md\n[327]: in_progress.md\n[328]: in_progress.md\n[329]: in_progress.md\n[330]: in_progress.md\n[331]: in_progress.md\n[332]: in_progress.md\n[333]: in_progress.md\n[334]: in_progress.md\n[335]: in_progress.md\n[336]: in_progress.md\n[337]: in_progress.md\n[338]: in_progress.md\n[339]: in_progress.md\n[340]: in_progress.md\n[341]: in_progress.md\n[342]: in_progress.md\n[343]: in_progress.md\n[344]: in_progress.md\n[345]: in_progress.md\n[346]: greedy/huffman.go\n[347]: greedy/huffman_test.go\n[348]: greedy/pairtasks.go\n[349]: greedy/pairtasks_test.go\n[350]: greedy/schedule.go\n[351]: greedy/schedule_test.go\n[352]: in_progress.md\n[353]: in_progress.md\n[354]: invariants/threesum.go\n[355]: invariants/threesum_test.go\n[356]: in_progress.md\n[357]: in_progress.md\n[358]: in_progress.md\n[359]: in_progress.md\n[360]: in_progress.md\n[361]: in_progress.md\n[362]: in_progress.md\n[363]: in_progress.md\n[364]: graphs/celebrity.go\n[365]: graphs/celebrity_test.go\n[366]: graphs/maze.go\n[367]: graphs/maze_test.go\n[368]: graphs/flipcolor.go\n[369]: graphs/flipcolor_test.go\n[370]: in_progress.md\n[371]: in_progress.md\n[372]: graphs/minconnected.go\n[373]: graphs/minconnected_test.go\n[374]: in_progress.md\n[375]: in_progress.md\n[376]: in_progress.md\n[377]: in_progress.md\n[378]: in_progress.md\n[379]: in_progress.md\n[380]: in_progress.md\n[381]: in_progress.md\n[382]: in_progress.md\n[383]: in_progress.md\n[384]: in_progress.md\n[385]: in_progress.md\n[386]: in_progress.md\n[387]: in_progress.md\n[388]: in_progress.md\n[389]: in_progress.md\n[390]: in_progress.md\n[391]: in_progress.md\n[392]: in_progress.md\n[393]: in_progress.md\n[394]: in_progress.md\n[395]: in_progress.md\n[396]: in_progress.md\n[397]: in_progress.md\n[398]: in_progress.md\n[399]: in_progress.md\n[400]: in_progress.md\n[401]: in_progress.md\n[402]: in_progress.md\n[403]: in_progress.md\n[404]: in_progress.md\n[405]: in_progress.md\n[406]: in_progress.md\n[407]: in_progress.md\n[408]: in_progress.md\n[409]: in_progress.md\n[410]: in_progress.md\n[411]: in_progress.md\n[412]: in_progress.md\n[413]: in_progress.md\n[414]: in_progress.md\n[415]: in_progress.md\n[416]: in_progress.md\n[417]: in_progress.md\n[418]: in_progress.md\n[419]: in_progress.md\n[420]: in_progress.md\n[421]: in_progress.md\n[422]: in_progress.md\n[423]: in_progress.md\n[424]: in_progress.md\n[425]: in_progress.md\n[426]: in_progress.md\n[427]: in_progress.md\n[428]: in_progress.md\n[429]: in_progress.md\n[430]: in_progress.md\n[431]: in_progress.md\n[432]: in_progress.md\n[433]: in_progress.md\n[434]: in_progress.md\n[435]: in_progress.md\n[436]: in_progress.md\n[437]: in_progress.md\n[438]: in_progress.md\n[439]: in_progress.md\n[440]: in_progress.md\n[441]: in_progress.md\n[442]: in_progress.md\n[443]: in_progress.md\n[444]: in_progress.md\n[445]: in_progress.md\n[446]: in_progress.md\n[447]: in_progress.md\n[448]: in_progress.md\n[449]: in_progress.md\n[450]: in_progress.md\n[451]: in_progress.md\n[452]: in_progress.md\n[453]: in_progress.md\n[454]: in_progress.md\n[455]: in_progress.md\n[456]: in_progress.md\n[457]: in_progress.md\n[458]: in_progress.md\n[459]: in_progress.md\n[460]: in_progress.md\n[461]: in_progress.md\n[462]: in_progress.md\n[463]: in_progress.md\n[464]: honorsclass/median.go\n[465]: honorsclass/median_test.go\n[466]: in_progress.md\n[467]: in_progress.md\n[468]: in_progress.md\n[469]: in_progress.md\n[470]: in_progress.md\n[471]: in_progress.md\n[472]: in_progress.md\n[473]: in_progress.md\n[474]: in_progress.md\n[475]: in_progress.md\n[476]: in_progress.md\n[477]: in_progress.md\n[478]: in_progress.md\n[479]: in_progress.md\n[480]: in_progress.md\n[481]: in_progress.md\n[482]: in_progress.md\n[483]: in_progress.md\n[484]: in_progress.md\n[485]: in_progress.md\n[486]: in_progress.md\n[487]: in_progress.md\n[488]: in_progress.md\n[489]: in_progress.md\n[490]: in_progress.md\n[491]: in_progress.md\n[492]: in_progress.md\n[493]: in_progress.md\n[494]: in_progress.md\n[495]: in_progress.md\n[496]: in_progress.md\n[497]: in_progress.md\n[498]: in_progress.md\n[499]: in_progress.md\n[500]: in_progress.md\n[501]: in_progress.md\n[502]: in_progress.md\n[503]: in_progress.md\n[504]: in_progress.md\n[505]: in_progress.md\n[506]: in_progress.md\n[507]: in_progress.md\n[508]: in_progress.md\n[509]: in_progress.md\n[510]: in_progress.md\n[511]: in_progress.md\n[512]: in_progress.md\n[513]: in_progress.md\n[514]: in_progress.md\n[515]: in_progress.md\n[516]: in_progress.md\n[517]: in_progress.md\n[518]: in_progress.md\n[519]: in_progress.md\n[520]: in_progress.md\n[521]: in_progress.md\n[522]: in_progress.md\n[523]: in_progress.md\n[524]: in_progress.md\n[525]: in_progress.md\n[526]: in_progress.md\n[527]: in_progress.md\n[528]: in_progress.md\n[529]: in_progress.md\n[530]: in_progress.md\n[531]: in_progress.md\n[532]: in_progress.md\n[533]: in_progress.md\n[534]: in_progress.md\n[535]: in_progress.md\n[536]: in_progress.md\n[537]: in_progress.md\n[538]: in_progress.md\n[539]: in_progress.md\n[540]: in_progress.md\n[541]: in_progress.md\n[542]: in_progress.md\n[543]: in_progress.md\n[544]: in_progress.md\n[545]: in_progress.md","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrekucci%2Fepi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrekucci%2Fepi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrekucci%2Fepi/lists"}