๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.63K subscribers
5.61K photos
3 videos
95 files
10.6K links
๐ŸšฉMain Group - @SuperExams
๐Ÿ“Job Updates - @FresherEarth

๐Ÿ”ฐAuthentic Coding Solutions(with Outputs)
โš ๏ธDaily Job Updates
โš ๏ธHackathon Updates & Solutions

Buy ads: https://telega.io/c/cs_algo
Download Telegram
PayPal hiring!!

1) ๐…๐ฎ๐ฅ๐ฅ ๐ญ๐ข๐ฆ๐ž ๐Ÿ๐จ๐ซ 2023 ๐ ๐ซ๐š๐๐ฌ

Link: https://lnkd.in/g3uHHky2

2) ๐ˆ๐ง๐ญ๐ž๐ซ๐ง ๐ก๐ข๐ซ๐ข๐ง๐  ๐Ÿ๐จ๐ซ 2024 ๐ ๐ซ๐š๐๐ฌ

Link: https://lnkd.in/g6P47GcK
def countMaximumOperations(self,s,t):
        if len(t) > len(s):
            return -1

        tCount = {}
        sCount = {}

        for i in range(len(t)):
            tCount[t[i]] = 1 + tCount.get(t[i],0)
            sCount[s[i]] = 1 + sCount.get(s[i],0)

        res = 1 if tCount == sCount else 0
        l = 0

        for r in range(len(t),len(s)):
            sCount[s[r]] = 1 + sCount.get(s[r],0)
            sCount[s[l]] -= 1
            if sCount[s[l]] == 0:
                sCount.pop(s[l])
            l+=1
            if sCount == tCount:
                res+=1
       
        return res if res > 0 else -1

Amazon โœ…
๐Ÿ‘1
โ—๏ธGreat news for Programmersโ—๏ธ

We have created a separate channel to help you guys prepare for the coding interviews.
We will provide practice questions with solutions and study material to crack coding interviews

Join fast
๐Ÿ‘‡๐Ÿ‘‡
@crackingthecodinginterviews
๐Ÿคฉ1