Ad
  • Custom User Avatar

    I found this Kata quite ambiguous. It says that the frequency-values will never be greater than 100, which means that it can be 100 as well. It must say "greater or equal". And also, it must specify that columns are two-space separated from each other. Would have been better to work with a general approach that computes how many spaces the columns have to be separated. For instance, the case {10, 10, 10, 9, 9, 9} expects the following answer:

    101010
    # # # 9 9 9
    # # # # # #
    ...
    

    but a better answer would be:

    10 10 10
    #  #  #  9  9
    #  #  #  #  #
    ...
    
  • Custom User Avatar

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

  • Custom User Avatar

    The issue that many people experienced is still present
    (Assertion `to_postfix(infix) == postfix' failed)
    . Consider the following code to fix it:

    #include <algorithm>
    string to_postfix_NEW(const string& infix) {
      // YOUR IMPLEMENTATION
    }
    string to_postfix(const string& infix) {
      int pos = find(infix.begin(), infix.end(), '\n') - infix.begin();
      return to_postfix_NEW(infix.substr(0, pos)) + infix.substr(pos, infix.size() - pos);
    }