3 ms·
Wrong link: https://github.com/thejsj/calendar-exercise https://github.com/thejsj/calendar-exercise
by hiphipjorge 11y ago
Wrong link: https://github.com/thejsj/calendar-exercise https://github.com/thejsj/calendar-exercise
- donatj 11y agoThat is the EXACT same problem they had me work on! We should start a club. I tried to impress them by not using any libraries, that may have been a mistake. It was a couple years ago now...
- vector57 11y agoI am not from Facebook, but I read through your tests and found one that violates the problem description on line 74 of test/index.js. The first statement of the problem is, "If two events collide in time, they MUST have the same width." So a width of 2/3 is not possible, all widths must have a numerator of 1. This rule is important because it makes the widths of the events deterministic, which otherwise they are not. That same test illustrates this exact problem, why not have the widths be 1/2, 1/4, 1/4, 1/2? Considering the first constraint the correct layout is all having width 1/3. https://github.com/thejsj/calendar-exercise/blob/master/test/index.js#L74 https://github.com/thejsj/calendar-exercise/blob/master/test...