EPI in Python
We've begun the process of writing Python solutions!
Python versions of the program in the EPI sampler are listed below and
we would really appreciate your thoughts on them with respect to idiomaticity and clarity.
Python has exceptionally powerful libraries. Our programs by design use a simple subset of the
library but in many cases we also provide alternative Pythonistic solutions.
Solutions are written for Python 3.4.
Compute the max-difference
Interconvert strings and integers
Reverse all the words in a sentence
Test for cyclicity
Stack with max API
Print a binary tree in level order
Test if a binary tree is balanced
Merge sorted arrays
Search a sorted array for the first occurrence of K
Test if an anonymous letter is constructible
Compute the intersection of two sorted arrays
Render a calendar
Test if a binary tree satisfies the BST property
Enumerate the power set
Count the number of ways to traverse a 2D array
The 3-sum problem
Paint a Boolean matrix
Analyze two unsynchronized interleaved threads
Many of the best ideas in the book (e.g., the study guide, ninja notation, the C++11 review) came from reader feedback.
Please write to us
, or post on the discourse forum, with suggestions for improvement.