• ###### thornejoshcommented on "Banker's Plan" kata

At year 1: f0=10000
At year 2: f1=10000-10000=0

Therefore at the end of year 2 John still has a non-negative amount on money.

• ###### thornejoshcommented on "Multiplicative Persistence... What's special about 277777788888899?" python solution

This would occur if n is a single digit number, because the product of all the digis in a single digit number is that number.

• ###### thornejoshcommented on "Strip Url Params" python solution

``````def strip_url_params(url, strip=None):
if not strip: strip = []
``````

perhaps use this:

``````def strip_url_params(url, strip=[]):
``````
• ###### tonylicodingresolved a suggestion on "Reflecting Light" kata

Done. Is it good?

• ###### Chrono79created an issue for "Ackermann Function " kata

m,n should be non-negative integers, the function should return null (Javascript), None (Python), or nil (Ruby) for other type, non-integer and negative numbers.

Not tested in javascript.

• ###### thornejoshcommented on "Ackermann Function " kata

This is a 6 kyu? You are basically given the program in the description.

• ###### thornejoshcommented on "Transform To Prime" python solution

`check_prime` function could be improved vastly, check out Blind4Basics solution for inspiration.

• ###### thornejoshcommented on "Feynman's square question" python solution

I would not consider this the best solution since this problem can be solved in `O(1)`.

• ###### thornejoshcommented on "Find the Mine!" python solution

I agree, `field.index(subfield)` adds an extra loop that is not necessarily needed.

• ###### Fbashamcommented on "Largest pair sum in array" python solution

You also have to remember that this is codewars. If the code needed to be time critical, the tests would reflect that. Speaking of which, if your code needs to be time critical in the real world, Python isn't the language for you, otherwise it's good enough for most jobs ;)

• ###### thornejoshcommented on "Highest Rank Number in an Array" python solution

`Counter(arr).items()` returns a list of `[(key1, value1), (key2, value2), ...]` where the keys are the distinct numbers in `arr` and the values are the occurrences of that key in `arr`. You can pass this into the `max` function with a custom `key` to retrieve the max value. The key takes in a `(key, value)` instance and compares it against other elements by first comparing `x[1]` then `x[0]` where `x[1]` is the occurrence of that number and `x[0]` is the number as stated before. You need to apply `[0]` to the outputted `(key,value)` of the max function to obtain the distinct number.

• ###### thornejoshcommented on "Backwards Read Primes" python solution

This comment is hidden because it contains spoiler information about the solution

• ###### sebastianhattcommented on "Largest pair sum in array" python solution

This comment is hidden because it contains spoiler information about the solution

• ###### thornejoshcommented on "Function Composition" python solution

Better safe than sorry I guess. In this kata it is not needed however.

• ###### thornejoshcommented on "Method For Counting Total Occurence Of Specific Digits" python solution

Nice but you are counting every digit regardless if it is in digits_list. Not too important but would speed up your solution for large integers_list and small digits_list.