Ransom Note : leetcode solution in python

class Solution:
    def canConstruct(self, ransomNote: str, magazine: str) -> bool:
            magazine = list(magazine)
            for i in ransomNote:
                if i in magazine:
                    return False
            return True

        except Exception as e:

Leave a Comment

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

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock