Q8Multiple correct3 Marks13 Apr 2025
Consider the following Python function:
Which of the following pairs of strings, when passed as arguments to test_func(s, t), will return True?
```
def test_func(s, t):
if len(s) != len(t):
return False
freq = {}
for ch in s:
freq[ch] = freq.get(ch, 0) + 1
for ch in t:
if ch not in freq or freq[ch] == 0:
return False
freq[ch] -= 1
return True
```