TheRedRover

6 kyu Are they the "same"?

Jun 13th, 2020
153
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. object Solution {
  2.   def comp(seq1: Seq[Int], seq2: Seq[Int]) = (seq1, seq2) match {
  3.     case (null, _) => false
  4.     case (_, null) => false
  5.     case (s1, s2) => s1.map { x => x * x }.sorted  == s2.sorted
  6.   }
  7. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×