Commit Graph

17 Commits

Author SHA1 Message Date
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
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
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
e1239d8902 Update arrays_strings constraints 2016-06-12 23:06:12 -04:00
Donne Martin
395264378c Update constraints for compress challenge and solution 2016-06-04 13:40:15 -04:00
Donne Martin
fe4c118812 Update final char case and unit test for #44. 2016-02-09 07:20:07 -05:00
Donne Martin
4953e6c114 Update compress solution so AAAAB becomes A4B.
Previously the solution would yield A4B1, which doesn't have as much compression.
2016-02-09 06:52:32 -05:00
Donne Martin
9bf96eabaa Polish compress solution. 2016-02-09 06:49:29 -05:00
Donne Martin
374d67ff30 Fix #13, PEP8-ify notebooks. 2015-07-11 15:34:14 -04:00
Donne Martin
44b73e3367 Tweaked compress challenge to make it more explicit that you should only compress a string if it saves space. Fixes #2. 2015-07-07 17:15:18 -04:00
Donne Martin
73924c279a Removed bytearray solution, needs some tweaks to make it work with Python 3. 2015-07-06 06:30:00 -04:00
Donne Martin
fac7bbb1be Tweaked constraints section discussion. 2015-07-06 06:03:09 -04:00
Donne Martin
d4d7c29c9d Tweaked compress challenge. 2015-07-05 08:54:49 -04:00
Donne Martin
78dadf9e45 Updated repo name. 2015-07-05 07:59:00 -04:00
Donne Martin
8b9a1473ea Added compress challenge. 2015-07-03 19:55:56 -04:00
Donne Martin
8d1783b717 Appended _solution to current notebooks to prepare for challenge and solution notebooks. 2015-06-30 06:25:31 -04:00