Commit Graph

6 Commits

Author SHA1 Message Date
Udit Gupta
308148653a Enhances 'base case' logic (#227)
Original function does not work when input array is empty or contains a single value. In the revised code, base case has been augmented to support those. Works successfully for all these test cases: find_max([1, 12, 8, 5]), find_max([]), find_max([1])
2022-11-18 15:47:57 -06:00
=
345d09b69e add recursive soln. 2020-06-03 15:28:01 +02:00
Maria Kovaleva
d7de908a82 Fix countdown.py returning None (#94)
The original code does not return the value in the if-clause and the return statement in the else-clause, which led to the function returning None at the end of the countdown (5, 4, 3, 2, 1, 0, None).
2018-12-28 08:25:48 -08:00
Ramit Mittal
2f939182ae Resolve Issue #40: Changed more examples to use python3 syntax (#56) 2018-03-19 09:48:21 -07:00
Danh Nguyen
1fa164c40e Resolve Issue #40: Python 2 print statements changed to use Python 3 print function (#50)
* Update 01_selection_sort.py

Updated last print statement for Python 3 print function.

* Update 01_countdown.py

Updated print statement to print function for Python 3.

* Update 05_quicksort.py

Updated print statement to print function for Python 3.

* Update 01_price_of_groceries.py

Condensed dictionary creation into one line, edited print statement to a print function for Python 3.

* Update 01_set_covering.py

Changed print statement to print function for Python 3.

* Update 01_binary_search.py

Changed print statements to print function for Python 3.
2018-02-03 11:15:07 -08:00
Aditya Bhargava
8cf108a20c code for chapter 3 2016-03-02 14:15:37 -08:00