Find Linked list is palindrome or not, was able to crack with array (in place of stack, basically same).
/**
* Q1. Write the code for the following pseudocode and explain how it work
* Initialize:
* max_so_far 0 max_ending_here 0 // initialized to zero
* Loop for each element of the array // integer array, iterating over the array, 0 < arr <1000
* (a) max_ending_here = max_ending_here + a[i] // counting the array values on every iteration, 1, 2, 3, 4, -11 => 1, 3, 6, 10, -1
* (b) if (max_ending_here < 0) max_ending_here = 0 // 0
* (c) if (max_so_far < max_ending_here) max_so_far = max_ending_here // 1, 3, 6, 10 => 10
*
* return max_so_far
*/
Both are easy questions