Ad
  • 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

    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

    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

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