LyWang

anagram

Nov 18th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. class Solution {
  2. public:
  3.     /**
  4.      * @param s: The first string
  5.      * @param t: The second string
  6.      * @return: true or false
  7.      */
  8.     bool anagram(string &s, string &t) {
  9.         // write your code here
  10.         if sorted(s) == sorted(t):
  11.             return true
  12.         else:
  13.             return false
  14.     }
  15. };
Add Comment
Please, Sign In to add comment