This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
kse-02/instrumented/anagram_check.py

13 lines
388 B
Python
Raw Permalink Normal View History

2023-11-13 15:33:20 +00:00
def anagram_check_instrumented(s1: str, s2: str) -> bool:
2023-11-13 15:33:20 +00:00
if (evaluate_condition(1, 'Eq', len(s1), 1) and evaluate_condition(2, 'Eq', len(s2), 1)):
return (s1 == s2)
if evaluate_condition(3, 'NotEq', len(s1), len(s2)):
return False
if evaluate_condition(4, 'Eq', ''.join(sorted(s1)), ''.join(sorted(s2))):
return True
else:
return False