Commit Graph

618 Commits

Author SHA1 Message Date
Donne Martin
2399eb60d3 Update stack min challenge (#128)
Rename variable min_vals to stack_of_mins to improve clarity.
Rename method min to minimum to avoid using the same name as the built-in min.
2016-12-08 05:32:13 -05:00
Donne Martin
385bc54efa Update tree bfs challenge (#127)
Switch from Exception to TypeError
2016-12-01 06:29:08 -05:00
Marek Piskorek
a88f0a0b0b Add two more test cases for string compress coding challenge. (#125)
* Add two more test cases for string compress coding challenge.

I believe that the existing test cases are not strict enough to assure
a proper solution for this challenge.

I was able to implement a wrong, but still passing solution to this
basing on set and collections.Counter mechanism, since the test cases
present only situations with singular occurrences of a letter chain and
all the test strings are alphabetically sorted.

I believe that the two new test cases enforce more thorough approach to
the problem and, in effect, the test cases are more descriptive.

* Fix the results in tests since the solution changed in the meantine on
original branch.

* Update also the test_compress and solution.
2016-11-30 07:41:16 -05:00
Donne Martin
9636459124 Update hash map challenge (#126)
Make hash_function private.
2016-11-30 07:16:44 -05:00
Donne Martin
5977fc994d Update linked list challenge (#124)
Remove extraneous check within the find method.  Clean up delete method.
2016-11-27 08:43:48 -05:00
Donne Martin
08d86de559 Remove redundant graph templates (#123)
Use the top-level templates folder instead.
2016-11-26 09:14:31 -05:00
Donne Martin
520aa89555 Update graph challenge (#122)
Simplify add_node logic.  Use more specific TypeError Exception.
2016-11-23 21:21:38 -05:00
Donne Martin
430cca2a01 Update hanoi challenge (#121)
Update constraints and test cases.  Move implementation to a class.  Update tests.
2016-11-19 09:01:44 -05:00
Donne Martin
14de5e4233 Update tree check balance challenge (#120)
Use more specific exception types.
2016-11-17 05:38:28 -05:00
Donne Martin
a0944eb5f4 Update graph dfs challenge (#119)
Fix algorithm space complexity.
2016-11-15 05:17:28 -05:00
Donne Martin
627ade950f Update graph bfs challenge (#118)
Add more detail to algorithm space complexity.
2016-11-14 06:41:42 -05:00
Donne Martin
9a321b9f15 Update graph bfs challenge
Add more detail to algorithm space complexity.
2016-11-14 06:39:16 -05:00
Donne Martin
2d98b8a496 Update graph challenge (#117)
Use more specific exception types. Update constraints. Update add_undirected_edge to use add_edge.
2016-11-13 07:32:33 -05:00
Donne Martin
3d4ae5c22f Update bst challenge (#116)
Switch Exception to TypeError.
2016-11-12 05:35:45 -05:00
Donne Martin
eb8547d8bd Update bst validate challenge (#115)
Change Exception to the more specific TypeError.
2016-11-09 06:56:44 -05:00
Donne Martin
0098574a47 Update bst challenge (#114)
Update constraints and assumptions.
2016-11-07 05:05:26 -05:00
Donne Martin
c6677586d3 Update reverse string challenge (#113)
Update input check logic to check for an empty but not None entry.
2016-11-06 08:38:08 -05:00
Donne Martin
aa4c8ae5b4 Update LL delete mid challenge (#112)
Update constraints and assumptions, solution, and test case.
2016-10-31 07:19:56 -04:00
Donne Martin
2d651a6eca Update queue from stacks challenge (#111)
Update test cases and __init__ method.
2016-10-29 09:13:02 -04:00
Donne Martin
12b58ccf9b Update set of stacks challenge solution (#110)
Add is_empty() method, remove extra linebreak.
2016-10-29 09:10:32 -04:00
Donne Martin
a7fc172004 Update stack min challenge test cases (#109) 2016-10-29 09:08:32 -04:00
Jan Chwiejczak
da87bcbfd4 Add functional solution to compress string challenge (#103) 2016-10-26 08:00:40 -04:00
Donne Martin
0bf56834c0 Update stack min challenge (#108)
Updates constraints and solution.
2016-10-26 07:57:51 -04:00
Donne Martin
cf337334a5 Update bst successor solution (#107)
Update bst successor solution
2016-10-25 06:22:34 -04:00
Donne Martin
bd89e83b65 Update linked list find loop to return a node (#106) 2016-10-21 20:27:58 -04:00
Donne Martin
c961a279fc Add two pointer solution to remove linked list dupes (#105) 2016-10-18 06:20:24 -04:00
Donne Martin
400dc8b55a Update hash map (#104)
Update constraints, test cases, algorithm, code, and tests.
2016-10-16 21:28:31 -04:00
Donne Martin
0f49f67a72 Polish compress string (#101)
Fix empty string check, move duplicate code to a method.
2016-10-12 07:28:12 -04:00
Donne Martin
ff9181fe92 Merge pull request #100 from donnemartin/develop
Move graph and tree challenges and solutions to classes
2016-09-10 07:44:45 -04:00
Donne Martin
1928712364 Move tree level lists to a class 2016-09-10 07:42:54 -04:00
Donne Martin
cd50f73069 Move graph path exists to a class 2016-09-10 07:42:21 -04:00
Donne Martin
62f806100e Move graph dfs to a class 2016-09-10 07:41:23 -04:00
Donne Martin
e1bf3e791a Move graph bfs to a class 2016-09-10 07:40:52 -04:00
Donne Martin
d1d1abd3db Move tree check balance to a class (#99) 2016-09-07 05:46:47 -04:00
Donne Martin
dfeb7f4d80 Move bst validate to a class (#98) 2016-08-30 06:06:58 -04:00
Donne Martin
982580d051 Merge pull request #97 from donnemartin/develop
Move tree challenges and solutions to classes
2016-08-14 08:31:06 -04:00
Donne Martin
9176ffe214 Move tree height to a class 2016-08-14 08:29:25 -04:00
Donne Martin
b4ed90e649 Move tree dfs to a class 2016-08-14 08:27:35 -04:00
Donne Martin
10a404c7ae Move tree bfs to a class 2016-08-14 08:26:57 -04:00
Donne Martin
b91b6a437b Move bst successor to a class 2016-08-14 08:23:11 -04:00
Donne Martin
857497115a Move bst min to a class 2016-08-14 08:22:07 -04:00
Donne Martin
82c9725000 Move bst to a class 2016-08-14 08:20:06 -04:00
Donne Martin
be5f29f98e Merge pull request #96 from donnemartin/develop
Move string challenges and solutions to classes
2016-08-13 06:46:33 -04:00
Donne Martin
8a7c14239c Move unique chars to a class 2016-08-13 06:42:05 -04:00
Donne Martin
14a2751862 Move string rotation to a class 2016-08-13 06:40:52 -04:00
Donne Martin
1fde26fcf5 Move string reverse to a class 2016-08-13 06:40:13 -04:00
Donne Martin
22e3549d7d Move string permutation to a class 2016-08-13 06:39:19 -04:00
Donne Martin
aa887db2e0 Move string compress to a class, update test 2016-08-13 06:37:48 -04:00
Donne Martin
a9d18bdcc0 Fix notebook credits to render properly on nbviewer (#94) 2016-07-31 08:11:18 -04:00
Donne Martin
113eddd3c3 Update graph remove_neighbor error handling (#93) 2016-07-20 07:29:48 -04:00