Skip to main content
Code Review

Timeline for Determine whether any permutation of a given array exists such that the sum of all subarrays of length K are equal

Current License: CC BY-SA 4.0

8 events
when toggle format what by license comment
Oct 10, 2018 at 13:26 comment added Flater Define subarray. Is it a contiguous set (e.g. for ABCDE, the only valid subarrays (K=3) are ABC, BCD and CDE) or non-contiguous (e.g. ACD is also considered a subarray)? No matter what definition you use, I cannot make heard or tails of your true/false examples. Can you show us a specific (exhaustive) list of all subarrays from a given example; and an explanation why this is true/false?
Oct 10, 2018 at 2:00 history bumped Community Bot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Sep 10, 2018 at 8:15 comment added Abascus @GarethRees Sir, in your example N = 8 and K = 3. This input will be invalid since 8 mod 3 != 0.
Sep 9, 2018 at 23:25 history edited hjpotter92 CC BY-SA 4.0
added 16 characters in body
Sep 9, 2018 at 23:23 answer added hjpotter92 timeline score: 2
Sep 9, 2018 at 19:37 comment added Abascus It will return False. All the possible subarrays (including the permutations of the given array) of length 2 are [1,2], [1,3], [1,4], [2,3], [2,4] and [3,4]. We can see that the sum of each of these subarrays are not equal.
Sep 9, 2018 at 16:09 comment added vnp How about [1, 2, 3, 4], and K = 2?
Sep 9, 2018 at 13:32 history asked Abascus CC BY-SA 4.0

AltStyle によって変換されたページ (->オリジナル) /