Welcome to Day 22 of the Python Coding Interview Challenge!
Master the most commonly asked string and array problems that test your problem-solving skills in technical interviews.
defis_palindrome(s):
return s == s[::-1]
print(is_palindrome("madam")) # True
3
Find the First Non-Repeating Character
from collections import Counter
deffirst_non_repeating(s):
count = Counter(s)
for char in s:
if count[char] == 1:
return char
returnNoneprint(first_non_repeating("aabbcde")) # c