hackerrank.com

Practice>Python>Sets>Symmetric Difference

건이두 2019. 2. 13. 12:52
728x90

Symmetric Difference

problem link : https://www.hackerrank.com/challenges/symmetric-difference/problem?h_r=next-challenge&h_v=zen
difficulty : easy

Tip

  • sorted() not sort() :-) is to sort items in a list
  • one set = M - N
  • other set = N - M
  • one set.update(other set)
  • covert set to list
  • sort list
  • it's not a tip, it is almost solution :)

Solution



728x90