Ad
  • Custom User Avatar

    kata hint / knowledge sharing != kata suggestion.

  • Custom User Avatar

    If we define a 'Eureka number' as a number that is the sum of its digits rasied to the power of the number that they occur in the number.

    They give the example 89 you can see that it is a since 8^1 + 9^2 = 8 + 81 = 89
    Another example is 135 --> 1^1 + 3^2 + 5^3 = 1 + 9 + 125 = 135

    Your job is to find all 'Eureka' numbers within a given range. Hope this helps

  • Custom User Avatar

    [JAVA] There should be a need of the user to check words that are different cases (case sensitivity). This is done for pyton but not for Java. thanks

  • Custom User Avatar

    You should divide your string into 5 partitions but they do not have to be equal in length (especially the case for the last partition). Given the string: "ABCDEFGHI" (of length 9) your partitions would be: ["AB","CD","EF","GH","I"] Hope this helps

  • Custom User Avatar

    Read QuantumRobotix's post below instead of opening another issue about the same. Try what I suggested there.

  • Custom User Avatar

    I'm also having an error "IndentationError: unindent does not match any outer indentation level". Works fine on vscode.

  • Custom User Avatar

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

  • Custom User Avatar

    Hi, if you have not yet got an answer to your question/ figured it out yet, I beleive you have copied the incorrect sequence. there should be a 4 where you put a 5 instead ie:

    [-2, 1, -3, 4, -1, 2, 1, -5, 4]

    not
    [-2, 1, -3, 5, -1, 2, 1, -5, 4]

    making the max sub-array [4, -1, 2, 1] which would be equal to 6.
    Hope this helps

  • Custom User Avatar

    I really enjoyed this kata and solved in both java and python. I was looking forward to reading the article but was having trouble finding it. Could the link to "Dmitry's article" please be added to the problem statement (Kata description) since I had trouble finding it. I was able to find it thanks to user: gayanw who posted the link as: http://blog.ostermiller.org/find-loop-singly-linked-list

    Thanks!

  • Custom User Avatar

    That's one of the reasons I prefer JS / Python: less worrying about types :D Anyway, always keep an eye on sample tests cases if they're given.

  • Custom User Avatar

    No, you're right. I should have looked at the example cases more closely. I solved it in python where you don't need to worry about types as much but couldn't figure out the c++ and java solutions since you need to specify the types (and I wrongfully assumed all would be strings)

    Thanks

  • Custom User Avatar

    But there's an example in description with integers. Also, there's a sample test with integers and characters. Is that not enough?

  • Custom User Avatar

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