Reverse only the alphabets in a string

Given a string that has alphabets and special characters. Write code that reverse only the alphabets in the string and does not change the special characters. INPUT STRING: AB$C^%DEF* OUTPUT: FE$D^%CBA* We have discussed a simple code to reverse a string in this post. We use the same logic here, the only difference here is […]

Reverse a string

Write a simple code to reverse a string. INPUT: “HELLO WORLD” OUTPUT: “DLROW OLLEH”

Maximum consecutive integers present in an array

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).

String Matching Algorithms

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 […]

Add numbers given in the form of Linked List

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:

Find Merge-Point of two Linked Lists

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.

DATABASE FOR PLACEMENT PREPARATION. PART_2

This is the first videos in a series of videos meant for B.Tech students who want to prepare database for placement (either campus placement or off-campus). If you want to brush up your database concepts, you may like the video. B.Tech students from other streams (Electrical, Mech., Civil, etc.) who want to sit in the […]

Database for placement preparation. Part_1

This is the first videos in a series of videos meant for B.Tech students who want to prepare database for placement (either campus placement or off-campus). If you want to brush up your database concepts, you may like the video. B.Tech students from other streams (Electrical, Mech., Civil, etc.) who want to sit in the […]