Ad
  • Custom User Avatar
  • Default User Avatar

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

  • Custom User Avatar

    Maybe you need to hear some not funny jokes?

    At a job interview a programmer is asked: how do you write code?

    Answer: well, it should be modular, easy to test, easy to maintain, easy to read, and use minimal/optimal amount of resources. Oh, and also to integrate easily with existing code.

    (at this point the interviewer-technical director remembers his real project he is currently working on and cries)

  • Default User Avatar

    I like your point about matching the letter cases, but the initial problem assumes there will be tests without letters (i.e. Kata.SameCase( 'a', '~') ) for which you should output '-1'.

  • Custom User Avatar

    I think that depends on the language they have been used and persons' feelings about that subject — in Python, for example, they have approximately same efficiency, while in other languages one has more power for not many strings (5-10) while the other has it for a lot of strings (100+).

    While there are only two strings to concat there is no big difference between these methods imho. Still thanks for the question ^.^

  • Custom User Avatar

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

  • Custom User Avatar

    They are literally where the cat starts and finishes, how else would you name them?

  • Default User Avatar

    In your Sample Tests, I cannot see that you've instantiated the class User:
    User user = new User();
    See if this helps.

  • Custom User Avatar

    Depends entirely on your lang

  • Default User Avatar

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

  • Default User Avatar

    Yes you're right, no need to use getValue(frank,level)

  • Custom User Avatar

    t=>a[t.Item1][t.Item3]>a[t.Item2][t.Item4] is executed on each of the 4 quads of indices. So let's take this first one (0,1,2,0): this translates to t=>a[0][2]>a[1][0].

  • Default User Avatar

    You're right, I'll fix it someday:)

  • Default User Avatar

    Maybe my English isn't perfect but I don't understand what your issue with the description is - the "clear description" of what x and y represent is the 2nd line of the description:

    • In other words, there exist integer numbers $x$ and $y$ such that: $gcd(a, b) = x \cdot a + y \cdot b$. Note that the coefficients $x$ and $y$ are not determined uniquely.

    The "there exist...such that..." formulation is quite standard in English mathematical texts that I have read - even if it may be unfamiliar for non-mathematical readers. If you are unfamiliar with such phraseology, here is a simple example -- you can define an even integer, E, in the following way: there exists an integer, N, such that E = 2 * N.

    As for "how they are meant to be found given variables a and b", that's the point of the kata - you have to find an algorithm that finds x and y given the inputs a and b??? In my above example, to find the N all you would do is divide E by 2. Here you have to do a bit more work to get x and y.

    If you get any more details in the kata description, all you'd have left would be to translate some pseudocode into your language of choice???

  • Custom User Avatar
  • Loading more items...