6 kyu

myjinxin katas #002 : Hotel room number

66 of 69myjinxin2015
Description
Loading description...
Puzzles
  • Please sign in or sign up to leave a comment.
  • anter69 Avatar

    It's not clear from the description that rooms 13_ are also unlucky, and floors 18_ also.

  • anter69 Avatar

    python, maybe JS too:

    • there should be fixed tests for "edge" cases, like floor 18, 118, room 13, etc
    • also for cases where room numbers should still be 2 digits (e.g. last room is 10299, not 102099)
    • error messages should be more useful, like "1801" should be "1901" instead of showing two whole lists (of up to 150 items).
  • saudiGuy Avatar

    JS testscases are full of unused material, it needs to be cleaned.

  • saudiGuy Avatar
  • ejini战神 Avatar
    • Node 12 should be enabled (Refer this and this for more info)
  • FArekkusu Avatar

    The description is badly formatted.

  • yn1046 Avatar

    It's not said that although a room and a floor can't include 13 SEPARATELY, the RESULTING number actually can contain it. Fix this in the description, please!

    • myjinxin2015 Avatar

      perhaps you mean the problem like iArunava asked below? If so, read my reply at that place ;-)

    • yn1046 Avatar

      I see, but the point of my message is that it would probably be better to mention this nuance in the details of the kata, because it seems like I'm far not the first one to have such question =)

      Suggestion marked resolved by yn1046 7 years ago
    • myjinxin2015 Avatar

      OK, I'll update the description as soon as possible ;-)

  • twypsy Avatar

    I won't look at a room on a hotel in the same way.

  • iArunava Avatar

    Expected: '['19101', '19102', '19103', '19105', '19106', '19107', '19108', '19109', '19110', '19111', '19112', '19115', '19116', '19117', '19118', '19119', '19120', '19121', '19122', '19123', '19125', '19126', '19127', '19128', '19129', '19130', '19131', '19132', '19133', '19135', '19136', '19137', '19138', '19139', '19150', '19151', '19152', '19153', '19155', '19156', '19157', '19158', '19159', '19160', '19161', '19162', '19163']',

    Expected: '['86001', '86002', '86003', '86005', '86006', '86007', '86008', '86009', '86010', '86011', '86012', '86015', '86016', '86017', '86018', '86019', '86020', '86021', '86022', '86023', '86025', '86026', '86027', '86028', '86029', '86030', '86031', '86032', '86033', '86035', '86036', '86037', '86038', '86039', '86050', '86051', '86052', '86053', '86055', '86056', '86057', '86058', '86059', '86060', '86061', '86062', '86063', '86065', '86066', '86067', '86068', '86069', '86070', '86071', '86072', '86073', '86075', '86076', '86077', '86078', '86079', '86080', '86081', '86082', '86083', '86085', '86086', '86087', '86088', '86089', '86090', '86091', '86092', '86093', '86095', '86096', '86097', '86098', '86099', '86100', '86101', '86102', '86103', '86105', '86106', '86107', '86108', '86109', '86110', '86111', '86112', '86115', '86116', '86117', '86118', '86119', '86120', '86121', '86122', '86123', '86125', '86126', '86127', '86128', '86129', '86150', '86151']'

    These are two Expected Outcomes. The question says not to have '13'. But as seen it retains 13 in the 1st output ['19129', '19130', '19131', '19132', '19133', '19135', '19136', '19137', '19138', '19139', '19150'] but skips the same in the second output ['86129', '86150'].

    I think something is wrong with the test cases. Or am I missing something?

    By the way, Awesome Kata!!! Loved it! :)

    • myjinxin2015 Avatar

      you should know, there are two parts: floor number and room number. In the first example above, floor number is 191 and room numbers are 1 to 63. 19130 has 1 and 3 but not 13. because it's neither from floor number, nor from room number.

    • iArunava Avatar

      O I see! Wish I would have found it on my own! Anyway, Thanks for pointing it out. :)

  • tichusp Avatar

    Hello friend, there seems to be a problem with the test cases. Here is an example :

    Testing for: realFloor = 97, totalRooms = 138 ✘ Expected: '['122001', '122002', '122003', '122005', '122006', '122007', '122008', '122009', '122010', '122011', '122012', '122015', '122016', '122017', '122018', '122019', '122020', '122021', '122022', '122023', '122025', '122026', '122027', '122028', '122029', '122030', '122031', '122032', '122033', '122035', '122036', '122037', '122038', '122039', '122050', '122051', '122052', '122053', '122055', '122056', '122057', '122058', '122059', '122060', '122061', '122062', '122063', '122065', '122066', '122067', '122068', '122069', '122070', '122071', '122072', '122073', '122075', '122076', '122077', '122078', '122079', '122080', '122081', '122082', '122083', '122085', '122086', '122087', '122088', '122089', '122090', '122091', '122092', '122093', '122095', '122096', '122097', '122098', '122099', '1220100', '1220101', '1220102', '1220103', '1220105', '1220106', '1220107', '1220108', '1220109', '1220110', '1220111', '1220112', '1220115', '1220116', '1220117', '1220118', '1220119', '1220120', '1220121', '1220122', '1220123', '1220125', '1220126', '1220127', '1220128', '1220129', '1220150', '1220151', '1220152', '1220153', '1220155', '1220156', '1220157', '1220158', '1220159', '1220160', '1220161', '1220162', '1220163', '1220165', '1220166', '1220167', '1220168', '1220169', '1220170', '1220171', '1220172', '1220173', '1220175', '1220176', '1220177', '1220178', '1220179', '1220180', '1220181', '1220182', '1220183', '1220185', '1220186'

    As you can see in this test case we are supposed to use 3 digits for the rooms but once we reach a room that is greater than 100 the testcase adds a zero at the beginning of the room which if I am reading the instructions correctly is not supposed to happen. More specifically we are in room 122099 and the next room is expected to be 1220100(I think it should be 122100 instead, correct?)