## Tech Mahindra Coding Questions

Introduction Tech Mahindra is a great company to join for both professionals and freshers alike. The company provides ample opportunities and massive scope for growth in the field of programming or IT in general. Cracking the Tech Mahindra Test is ...

## Implementation of Stacks Using Queues

Introduction In this article, we will work on a very interesting problem called the implementation of stacks using queues, which will require an understanding of both data structures, namely stacks and queues. So, in case you are not familiar with ...

## Rearrange a Linked List in Place

Introduction Are you not able to shuffle and manipulate the pointers in a linked list? Or if you can solve all questions on linked lists? In either case, we have brought you another problem on linked lists, i.e., rearrange a ...

## Length of the Loop in the Linked List

Introduction The linked list data structure is one of the most important topics in technical interviews. It forms a variety of tricky yet straightforward questions. This article explains one such question in detail. Finding whether a linked list contains a ...

## The Intersection Point of Two Linked Lists

Introduction  Linked lists are one of the frequently asked data structures in interviews. Some of the questions on the linked list asked in product-based companies like Amazon, Microsoft are  Detect And Remove Cycle, Merge two sorted linked lists, etc.  This ...

## Detect a Loop in a Linked List

Introduction All of us are working hard to crack the interview in a dream company of ours. We are preparing for the interviews, practicing coding questions, and putting in our hundred percent.  One important topic we should be well versed ...

## Check if a Linked List is Palindrome or Not?

Introduction A linked list is a linear data structure that consists of nodes. Each Node contains a data field and a pointer to the next Node. In Linked List, unlike arrays, elements are not stored at contiguous memory locations but ...

## How to Delete the Middle Element of a Stack?

Introduction Deleting, inserting, searching, and popping are some basic operations done in the stack data structure. There are a whole lot of problems available with these operations. For example, Inserting element at the bottom of a stack.  Problem Statement Given ...

## Searching and Sorting in Rotated Sorted Array: Part 1

Table of Contents Introduction The Naive Approach Algorithm Implementation of the Naive Approach The Optimized Approach Algorithm Implementation of the Optimized Approach Frequently Asked Questions Key Takeaways Introduction Let’s imagine a scenario in which we have a rotated sorted array ...

## Given a Sorted and Rotated Array, find if there is a Pair with a Given Sum

Introduction Before diving into the problem, let’s understand the concept behind the sorted and rotated array for a clear vision. Unlike the standard arrays, the elements are stored in ascending or descending order in a sorted array. For example: We ...