Ad
  • Default User Avatar

    Great kata! Very original. Enjoyed solving it. Only 189 completions in 7 years? Come on codewarriors, give it a go. This one deserves more attention.

  • Custom User Avatar
    • Ignorant design
    • Just bad design
    • Language agnosticism

    All three are bad, but not all questions have a good answer ..

  • Custom User Avatar

    approved

  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar

    Why returning std::vector<int> in C++, if there is a built-in std::complex<int>?

  • Custom User Avatar

    Sample tests and initial solution are broken.

    • Initial solution has using namespace std; in it. That shouldn't be a case.
    • Sample tests rely on using namespace std; being in the solution. That shouldn't be a case either.
  • Default User Avatar

    It was like SUPER late when I attempted the problem and I was not at my best. I know all about base-types and numerical expressions.
    I was just being stupid. I got some help via discord and ended up getting to a solution that, while clunky, helped to teach me some fundamentals.
    I put an EXTENSIVE comment suite in the solution that explains my data stream for a sample input. Thanks!

  • Custom User Avatar

    Do you know what are number systems with different bases? Like binary, octal, decimal, hexadecimal?
    Do you know what are imaginary numbers, complex numbers, and imaginary unit i?

    There are two ways to solve this kind of problems:

    • research relevant topics, like the two I mentioned above, or
    • leave the kata for now, and forget it, or come back to it after getting better grasp of maths behind it.
  • Default User Avatar

    I am pretty new to coding and do not really know what to do with a problem that is basically pure maths like this. What does that last block mean [a, b] = a+b*i? What is my output actually supposed to look like? If I am given a string with some number like 101 (one hundred one) and...is that not ALREADY in base 10 form? I am very confused. Could I have some clarification? Thanks!

  • Custom User Avatar
  • Default User Avatar

    10010 in base i would be: 1*i^4 + 0 * i^3 + 0 * i^2 + 1 * i^1 + 0 * i^0 = 1 + -i = 1-i

    This should be 1 + i, 1 * i^1 = i not -i

  • Custom User Avatar
  • Default User Avatar

    Fixed, thanks!

  • Custom User Avatar

    Description, second code block: why are you going on into negative exponents? This would be applicable to some fixed point situation, but not here, is it? It's inconsistent with all other examples and tests.

    Third code block: -1 + 0 + 1 does not equal 2. The example test has this correct though.

  • Loading more items...