Given an array of integers. Find the maximum number of consecutive integers present in the array. For example, if the array is: int arr[] = { 2, 24, 22, 60, 56, 23, 25}; Then the answer should be 4, because there are 4 consecutive integers present in the array (22, 23, 24, 25).

Give the recursive implementation of the Bubble Sort algorithm

Given a string of characters, search for a pattern (another smaller string) in the string. For example, if given string is Ritambhara Technologies for Coding Interviews and the pattern is Tech, then the pattern is present in the string. If the pattern that we are looking for is Moksha, then this pattern is not present […]

Two numbers are given in the form of linked list (with each node storing one digit). Write an algorithm which will compute the sum of these two linked lists. The result should be a linked list as below:

Given two linked lists that merge at some point as shown below: Last four nodes are common to both the lists. Given pointers to the header nodes of each list, find the first common node.

Given an array of integers and a number x. check if there exists two elements in the array whose sum = x.

Given the linked list implementation of a generic queue in Java.

Given a multi-level linked list as shown in this post. Write code to search in such a list.

Given a linked list, where each node has a pointer to the head of its child list (in addition to the next pointer). The child list is a normal linked list with each node having one data and one pointer to the next node in the child list. Let the lists be arranged (as above) […]

Given a linked list, write code to print the list in forward and backward order. Solution: This problem is discussed as an example in this post. A linked list is a data structure where address of next node is stored inside each node. Structure of Node Structure of Node of a list is as given […]