Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object Solution {
- def comp(seq1: Seq[Int], seq2: Seq[Int]) = (seq1, seq2) match {
- case (null, _) => false
- case (_, null) => false
- case (s1, s2) => s1.map { x => x * x }.sorted == s2.sorted
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement