Timeline for Check if two lists are permutations of the one another ( Improvement)
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 20, 2020 at 12:00 | history | tweeted | twitter.com/StackCodeReview/status/1263077060878237705 | ||
May 20, 2020 at 11:33 | answer | added | Surt | timeline score: 1 | |
May 20, 2020 at 11:11 | comment | added | Josiah |
There's a bug in this code because it allows each character in the first string to be counted against multiple copies of that character in the second. As such it returns False (count==4, n==2) for permutation([2,2], [2,2]) which obviously should be True, and True (count==n==3) for permutation([0,1,2], [1,2,2]) which should be False.
|
|
May 20, 2020 at 10:12 | history | became hot network question | |||
May 20, 2020 at 9:47 | answer | added | Mario Ishac | timeline score: 10 | |
May 20, 2020 at 2:39 | answer | added | mti2935 | timeline score: 1 | |
May 20, 2020 at 1:49 | history | asked | Uncalled Astronomer | CC BY-SA 4.0 |