def find_middle_element(head): slow = head fast = head

def max_subarray_sum(arr): max_sum = float('-inf') current_sum = 0

Given a string, find the first non-repeating character in it.

class Node: def __init__(self, data): self.data = data self.next = None

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

Tcs Coding Questions 2021 __full__

def find_middle_element(head): slow = head fast = head

def max_subarray_sum(arr): max_sum = float('-inf') current_sum = 0 Tcs Coding Questions 2021

Given a string, find the first non-repeating character in it. def find_middle_element(head): slow = head fast = head

class Node: def __init__(self, data): self.data = data self.next = None target sum - 7

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