Tcs Coding Questions 2021 _verified_ -

Given a linked list, find the middle element.

print(find_middle_element(head)) # Output: 3 Tcs Coding Questions 2021

return slow.data

for num in arr: current_sum = max(num, current_sum + num) max_sum = max(max_sum, current_sum) Given a linked list, find the middle element

class Node: def __init__(self, data): self.data = data self.next = None Given a linked list