Commit Graph

93 Commits

Author SHA1 Message Date
Abok Isaac
80f6b6a680 Added the set solution for str_diff_solution 2017-04-25 01:08:31 +03:00
Abok Isaac
d96b6179a9 Added the set solution for str_diff_solution 2017-04-25 00:48:57 +03:00
Ammar Najjar
83ad7ff23a Simplify reverse string code, improve algorithm readability (#183) 2017-04-16 15:19:49 -07:00
Ammar Najjar
fcd4e52e91 Add assumption to str diff challenge to match the suggested solution (#178) 2017-04-12 08:23:40 -04:00
Ammar Najjar
ffd4798f23 Fix two sum unit_test challenge to match the solution notebook (#176) 2017-04-11 07:44:04 -04:00
Varun Upadhyay
96b01d00ff Update two_sum challenge arguments to match solution (#167) 2017-04-09 09:21:16 -04:00
Chris Wynne
919a9d9924 Update solution link for better_compress_challenge (#169)
The link to the solution on the `better_compress_challenge` notebook
was linking to the solution for the standard `compress_challenge`.
2017-04-08 10:06:22 -04:00
rockybutler
cf3e33b290 Add link from string diff challenge notebook to solution notebook (#165) 2017-04-06 08:02:58 -04:00
William Chargin
556a9adc11 Add duplicate-characters test for permutations (#158)
Summary:
The current test cases for the "string permutation checker" problem do
not include a test case where the inputs have the same elements at
different multiplicities. Without this test case, the implementation

    return s1 is not None and s2 is not None and set(s1) == set(s2)

would pass all tests.

Test Plan:
First, change one of the implementations to the above implementation,
and see that the original tests still pass. Then, apply this patch to
add the new test case. Then, revert the implementation change to see all
tests pass again.
2017-04-04 05:58:53 -04:00
Donne Martin
7d8a40adf8 Add str diff challenge 2017-03-30 05:43:16 -04:00
Donne Martin
3ecc5ed263 Add priority queue challenge 2017-03-30 05:42:41 -04:00
Donne Martin
1112520784 Add two sum challenge 2017-03-30 05:42:09 -04:00
Donne Martin
7884146d54 Standardize spacing code style (#150) 2017-02-25 20:20:16 -05:00
Donne Martin
eba98452e3 Add fizz buzz challenge (#149) 2017-02-14 06:19:21 -05:00
Donne Martin
f0ae87ed74 Fix challenge titles punctuation (#132) 2016-12-18 07:20:35 -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
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
Jan Chwiejczak
da87bcbfd4 Add functional solution to compress string challenge (#103) 2016-10-26 08:00:40 -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
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
895011b685 Polish unique chars challenge and solution
Add None input test case.  Update constraints.
2016-06-12 23:19:09 -04:00
Donne Martin
4c45be5a9e Exit out of loop once key is found/removed from hash map 2016-06-12 23:16:06 -04:00
Donne Martin
e1239d8902 Update arrays_strings constraints 2016-06-12 23:06:12 -04:00
Donne Martin
1656fd50e3 Polish permutation challenge and solution 2016-06-05 07:18:14 -04:00
Donne Martin
39c4a6dccc Merge pull request #49 from yask123/patch-1
Fix bug in permutations challenge and solution
2016-06-04 13:45:08 -04:00
Donne Martin
395264378c Update constraints for compress challenge and solution 2016-06-04 13:40:15 -04:00
Yask Srivastava
a3c45ae613 Fixed bug 2016-05-08 13:36:50 +05:30
Donne Martin
21add6f4f5 Rename list_of_chars to reverse_string. 2016-02-14 06:04:48 -05:00
Donne Martin
b0a091f589 Polish rotation solution. 2016-02-10 06:30:11 -05:00
Donne Martin
75becf1afb Polish permutation solution. 2016-02-10 06:29:50 -05:00
Donne Martin
186a192c61 Update array compress unit test to match solution and challenge notebooks. 2016-02-10 06:29:22 -05:00
Donne Martin
fe4c118812 Update final char case and unit test for #44. 2016-02-09 07:20:07 -05:00
Donne Martin
2084bbf5c9 Update compress challenge based on #44. 2016-02-09 07:00:41 -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
eee55dfa80 Add in-place reverse string test to solution notebook. 2016-02-09 04:46:44 -05:00
Donne Martin
363105cfc0 Merge branch 'reverse_string/check-inplace' of git://github.com/irheart/interactive-coding-challenges into irheart-reverse_string/check-inplace
* 'reverse_string/check-inplace' of git://github.com/irheart/interactive-coding-challenges:
  Test for inplace modification of the array.
2016-02-09 04:40:31 -05:00
Donne Martin
668864aa62 Rename alt compress solution. 2016-02-09 04:35:09 -05:00
Donne Martin
d9b5c57d5e Fix indentation. 2016-02-09 04:33:48 -05:00
Donne Martin
53d0ce9142 Update author to hashhar's challenge. 2016-02-09 04:33:09 -05:00
kmt
2fd239fbeb Test for inplace modification of the array. 2016-01-20 21:40:15 +03:00
Ashhar Hasan
aa24c9a173 Removed the fixme 2015-12-19 02:36:11 +05:30
Ashhar Hasan
ec6ced98a1 Replaced tabs with spaces 2015-12-19 02:32:46 +05:30