We use cookies and other technologies on this website to enhance your user experience. Read more Privacy Policy.I Agree

return count

Example: Input - 1 -> 2 -> 3 -> 4 -> 5, Output - 3

Given a linked list, find the middle element.

Given a string, check if it's a palindrome or not.

for char in s: if char_count[char] == 1: return char

Example: Input - "aabbc", Output - "c"

Example: Input - [1, 2, 3, 4, 5], target sum - 7, Output - 2