Tcs Coding Questions 2021 Now

Given a linked list, find the middle element.

for num in arr: complement = target_sum - num if complement in seen: count += 1 seen.add(num) Tcs Coding Questions 2021

return slow.data

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

Given a string, check if it's a palindrome or not. Given a linked list, find the middle element