Move all Negative Numbers to Beginning and Positive to End with Constant Extra Space

Suppose you have an array of integers. It consists of both negative and positive numbers and the problem statement asks to shift/move all the negative and positive elements to the left of the array and to the right of the array respectively without using extra space. Example  Input: arr[]={2,4,-10,13,-7,-60,52,8,-19 } …

Read more

Write a function to get the intersection point of two Linked Lists

Problem Statement The problem “Write a function to get the intersection point of two Linked Lists” states that you are given two linked lists. But they are not independent linked lists. They are connected at some point. Now you need to find this point of intersection of these two lists. …

Read more