Commit Graph

79 Commits

Author SHA1 Message Date
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
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
Donne Martin
0e866dc7c0 Update bst string representation method (#92)
__repr__ is also used by __str__, but not vice versa.
2016-07-20 07:24:04 -04:00
Donne Martin
cb660acd13 Rework graph challenge and solution (#90) 2016-07-04 07:16:15 -04:00
Donne Martin
618eeedfe3 Polish graph path exists challenge and solution (#89)
Update constraints and code.
2016-06-28 04:38:02 -04:00
Donne Martin
d4ef6108fb Update constraints for bfs and dfs graph challenge and solution (#88) 2016-06-28 04:35:29 -04:00
Donne Martin
46357c139c Update constraints for tree height challenge and solution (#87) 2016-06-28 04:33:10 -04:00
Donne Martin
5093103324 Rework graph challenge and solution (#86) 2016-06-26 17:48:32 -04:00
Donne Martin
d3fd7bc0a1 Polish bst check balanced challenge and solution (#84)
Update constraints, tests, and code.
2016-06-25 22:13:15 -04:00
Donne Martin
589ff06b15 Polish bst validate challenge and solution (#83)
Update constraints, test cases, tests, algorithm discussion, and code.
2016-06-25 22:08:54 -04:00
Donne Martin
7b573ceaa3 Polish bst successor challenge and solution (#82)
Update constraints, test cases, tests, algorithm discussion, and code.
2016-06-25 22:06:35 -04:00
Donne Martin
042161dc3b Update bst insert to return the inserted node (#81) 2016-06-25 21:03:26 -04:00
Donne Martin
7882ed9ae7 Polish check tree balance challenge and solution (#80)
Update constraints, test cases, tests, and code.
2016-06-25 08:42:16 -04:00
Donne Martin
996058195d Polish tree level lists challenge and solution (#79)
Update constraints and test cases.
2016-06-25 08:37:39 -04:00
Donne Martin
884bbe4870 Polish tree dfs challenge and solution (#78)
Update constraints and algorithm discussion.
2016-06-25 08:30:02 -04:00
Donne Martin
c7854b69cc Polish tree bfs challenge and solution (#77)
Update constraints and algorithm discussion.
2016-06-25 08:26:19 -04:00
Donne Martin
1321723eb9 Polish bst min challenge and solution (#76)
Update constraints, algorithm discussion, and code.
2016-06-25 08:23:28 -04:00
Donne Martin
c24a628329 Polish bst challenge and solution (#75)
Update constraints, algorithm discussion, and code.
2016-06-24 07:23:20 -04:00
z123
4306797043 Fixed issues with node state. 2016-05-08 11:22:47 -07:00
Donne Martin
358791fbbc Update dfs solution complexity discussion 2016-03-02 07:50:28 -05:00
Donne Martin
de0e70de4f Polish bst challenge and solution
Add root is None input test case.  Update time and space complexity discussion.
2016-03-01 07:03:37 -05:00
Donne Martin
fbf546ccc3 Update template notebook headers to render properly on nbviewer, update author link. 2015-12-11 05:19:33 -05:00
Donne Martin
5d1f8ae79e Add bst successor challenge. 2015-12-02 07:14:34 -05:00
Xiaojian Wang
edfbec618f Fix check_balance solution for a new test case 2015-10-09 22:53:42 -07:00
Donne Martin
1f45095f60 Added three state variable visit_state which will be useful for more advanced challenges such as topological sort. 2015-08-23 08:08:46 -04:00
Donne Martin
82b74ca7b4 Revised path exists challenge algorithm discussion. 2015-08-16 08:23:26 -04:00
Donne Martin
6b269d0f45 Updated bst to keep track of its parent and to return the node it inserts. 2015-08-16 08:21:11 -04:00
Donne Martin
f26f61e949 Added bst validate challenge. 2015-08-14 19:30:09 -04:00
Donne Martin
5a697d7e7c Fixed Big O space complexity. 2015-08-13 06:52:32 -04:00
Donne Martin
224aef1d47 Fixed Big O space complexities. 2015-08-13 06:52:15 -04:00
Donne Martin
e50dff94b0 Fixed Big O space complexity. 2015-08-13 06:51:53 -04:00
Donne Martin
d99db4e110 Fixed Big O complexities. 2015-08-13 06:48:52 -04:00
Donne Martin
d6efaca8d8 Fixed whitespace for PEP8. 2015-08-13 06:48:08 -04:00
Donne Martin
53034144d4 Added binary tree balance check challenge. 2015-08-06 06:09:30 -04:00
Donne Martin
bf4222d6e1 Added tree level lists challenge. 2015-08-05 18:17:27 -04:00
Donne Martin
0c0ea408ee Added min height bst challenge. 2015-08-05 18:16:26 -04:00
Donne Martin
d098e67ffd Saved tree height challenge solution so it can be reused as a component to other related challenges. 2015-08-05 18:15:03 -04:00
Donne Martin
b109b6f8cc Simplified challenge coding and unit tests by working with the node directly as opposed to node.id or node.data, which is more natural when writing coding challenges. 2015-08-05 06:14:44 -04:00
Donne Martin
1c5f34eb3e Added graph path exists challenge. 2015-08-05 05:49:41 -04:00
Donne Martin
74d25491ca Tweaked ordering of graph and bst challenges. 2015-08-05 05:47:02 -04:00
Donne Martin
25eaf0224a Simplified check to determine if there are items in the queue. 2015-08-05 05:45:30 -04:00
Donne Martin
370ceaf414 Simplified check to determine if there are items in the queue. 2015-08-05 05:45:02 -04:00
Donne Martin
bad87c9f87 Added graph bfs challenge. 2015-08-04 20:02:28 -04:00
Donne Martin
43eb3f84fa Added graph dfs challenge. 2015-08-04 20:01:59 -04:00
Donne Martin
1e5ff4f465 Added results.py, which helps with testing graph and tree problems. 2015-08-04 19:46:22 -04:00