Timeline for Anagram checking implementation
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 14, 2018 at 3:23 | comment | added | Anirudh Thatipelli | @rofl Isn't sorting the elements take O(n logn) extra time complexity? | |
Jul 14, 2018 at 3:22 | comment | added | Anirudh Thatipelli | @EricStein Sincere apologies. I didn't know that keeping braces on the new line was a huge violation of coding practices. I will try to improve upon it from next time. | |
Jul 13, 2018 at 18:47 | comment | added | Eric Stein |
Anirudh simply refuses to use curly braces in a manner consistent with common practice. There are a couple of other things I've seen pointed out to him that he just Doesn't Want To Do. I've given up on being helpful because of it. For fans of streaming, you can also one-line the method as return Arrays.equals(s1.codePoints().sorted().toArray(), s2.codePoints().sorted().toArray()) ? "YES" : "NO";
|
|
Jul 13, 2018 at 18:31 | history | answered | rolfl | CC BY-SA 4.0 |