Check if two strings are permutations in python

Problem

Write an algorithm in Python to check if two strings are permutations of each other

Solution

Let us differentiate between permutations and combinations. An easy way is to think about permutations in terms of lists and combinations in terms of sets. Take a look at the code snippets below…

Code

Thanks for visiting. Please use the comments section below for feedback

Tags:

Add a Comment

Your email address will not be published. Required fields are marked *