Skip to content
DSA
Data Structures
Arrays
Matrix
Strings
Linked List
Singly Linked List
Doubly Linked List
Circular Linked List
Doubly Circular Linked List
Linked List Tutorial
Stack
Queue
Tree
Generic Tree
Binary Tree
Binary Search Tree
AVL Tree
B Tree
B+ Tree
Red Black Tree
Tree Data Structure Tutorial
Heap
Hashing
Graph
Set Data Structure
Map Data Structure
Advanced Data Structure
Data Structures Tutorial
Algorithms
Analysis of Algorithms
Design and Analysis of Algorithms
Asymptotic Analysis
Asymptotic Notations
Worst, Average and Best Cases
Searching Algorithms
Linear Search
Binary Search
Searching Algorithms Tutorial
Sorting Algorithms
Selection Sort
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Heap Sort
Counting Sort
Radix Sort
Bucket Sort
Sorting Algorithms Tutorial
Greedy Algorithms
Dynamic Programming
Graph Algorithms
Pattern Searching
Recursion
Backtracking
Divide and Conquer
Mathematical Algorithms
Geometric Algorithms
Bitwise Algorithms
Randomized Algorithms
Branch and Bound
Algorithms Tutorial
DSA Tutorial
Competitive Programming
Company Wise SDE Sheets
Facebook SDE Sheet
Amazon SDE Sheet
Apple SDE Sheet
Netflix SDE Sheet
Google SDE Sheet
Wipro Coding Sheet
Infosys Coding Sheet
TCS Coding Sheet
Cognizant Coding Sheet
HCL Coding Sheet
DSA Cheat Sheets
SDE Sheets
FAANG Coding Sheet
Love Babbaar Sheet
Mass Recruiter Sheet
Product-Based Coding Sheet
Company-Wise Preparation Sheet
Top Interview Questions
Top 100 DSA Interview Questions Topic-wise
Top 50 Array Problems
Top 50 String Problems
Top 50 Problems on Stack
Top 50 Problems on Heap
Top 20 Linked List Interview Question
Top 50 Tree Problems
Top 50 Graph Problems
Top 50 Problems on Recursion
Top 20 Greedy Algorithms Interview Questions
Top 50 Dynamic Programming (DP) Problems
Top 20 Hashing Technique based Interview Questions
Top 20 Dynamic Programming Interview Questions
Top 10 algorithms in Interview Questions
Commonly Asked Data Structure Interview Questions
Puzzles
All Puzzles
Top 100 Puzzles Asked In Interviews
Top 20 Puzzles Commonly Asked During SDE Interviews
Top MCQs on Puzzles with Answers
Crossword Puzzle Of The Week
Tutorials
Programming Languages
C
C++
Python
R
Golang
C#
Swift
Kotlin
Scala
Perl
Java
Java Tutorial
Java Collection
Java 8 Tutorial
Java Advance
Spring Tutorial
Spring Boot Tutorial
Spring MVC Tutorial
Hibernate Tutorial
Java Interview Questions
Java Interview Questions
Multithreading Interview Questions
Collection Interview Quesions
Java Programs
Java Projects
CS Subjects
Mathematics
Operating System
DBMS
Computer Networks
Computer Organization and Architecture
Theory of Computation
Compiler Design
Digital Logic
Software Engineering
System Design
System Design Tutorial
What is System Design
Key Terminologies in System Design
Analysis and Architecture of Systems
Scalability in System Design
Databases in System Design
High Level Design or HLD
Low Level Design or LLD
Communication Protocols
Web Servers and Proxies
Case Studies in Designing Systems
Complete System Design Tutorial
System Design Patterns
Factory Pattern
Observer Pattern
Singleton Design Pattern
Decorator Pattern
Strategy Pattern
Adapter Pattern
Command Pattern
Iterator Pattern
Prototype Design Pattern
All Design Patterns
System Design Roadmap
Top 10 System Design Interview Questions and Answers
DevOps
Git
AWS
Docker
Kubernetes
Microsoft Azure Tutorial
Google Cloud Platform
SQL Tutorial
Interview Questions
C Interview Questions
C++ Interview Questions
STL Interview Questions
Java Interview Questions
Python Interview Questions
R Interview Questions
SQL Interview Questions
Linux Interview Questions
C# Interview Questions
Android Interview Questions
Flutter Interview Questions
Operating System Interview Questions
Computer Network Interview Questions
Software Engineering Interview Questions
CCNA Interview Questions
Ethical Hacking Interview Questions
Interview Corner
Company Preparation
Top Topics
Practice Company Questions
Interview Experiences
Experienced Interviews
Internship Interviews
Competitive Programming
Multiple Choice Quizzes
Aptitude for Placements
Projects
C++ Projects
Java Projects
Python Projects
Machine Learning Projects
Android Projects
Cheat Sheets
C CheatSheet
C++ CheatSheet
C++ STL CheatSheet
Python CheatSheet
Docker CheatSheet
Kubernetes CheatSheet
Computer Network CheatSheet
CCNA CheatSheet
Ethical Hacking CheatSheet
Quizzes
C Quiz
C++ Quiz
Java Quiz
Python Quiz
DBMS Quiz
Operating System Quiz
Computer Network Quiz
COA Quiz
ML & Data Science
Python Tutorial
R Tutorial
Machine Learning
Machine Learning Maths
Machine Learning Tutorial
Machine Learning Projects
Data Science using Python
Data Science using R
Data Science Packages
Pandas Tutorial
NumPy Tutorial
Data Visualization
Data Visualization with Python
Python Data Visualization Tutorial
Matplotlib Tutorial
Bokeh Tutorial
Plotly Tutorial
Seaborn Tutorial
Data Visualization with R
Data Visualization with R
Plotly Tutorial
ggplot Tutorial
Data Visualization Tools
Tableau
Power BI
Data Analysis
Data Analysis with Python
Data Analysis with R
Deep Learning
Deep Learning Tutorial
Deep Learning Projects
NLP Tutorial
OpenCV Tutorial
Interview Questions
Machine Learning Interview Question
Deep Learning Interview Question
Python Interview Questions
Top 50 R Interview Questions
ML Frameworks
Tensorflow
PyTorch
PyTorch Lightning
Web Development
HTML
CSS
JavaScript
PHP
Bootstrap Tutorial
CSS Frameworks
Tailwind CSS
Foundation CSS
Materialize CSS
Bulma
Pure CSS
Primer CSS
Blaze UI
Semantic UI
JavaScript Frameworks
AngularJS
Angular PrimeNG
Angular ngx Bootstrap
NodeJS
Express.js
JavaScript Libraries
jQuery
jQuery Mobile
jQuery UI
jQuery EasyUI
jQWidgets
ReactJS
React Bootstrap
React Rebass
React Desktop
React Suite
ReactJS Evergreen
ReactJS Reactstrap
Ant Design
BlueprintJS
p5.js
Lodash
TensorFlow.js
Moment.js
Collect.js
Django Tutorial
WordPress
JSON
Web Dev Cheat Sheets
HTML Cheat Sheet
CSS Cheat Sheet
Bootstrap Cheat Sheet
JS Cheat Sheet
jQuery Cheat Sheet
Angular Cheat Sheet
Practice
All DSA Problems
Problem of the Day
GFG SDE Sheet
Curated DSA Lists
Beginner's DSA Sheet
Love Babbar Sheet
Top 50 Array Problems
Top 50 String Problems
Top 50 DP Problems
Top 50 Graph Problems
Top 50 Tree Problems
Home
Saved Videos
Courses
Data Structures and Algorithms
DSA Tutorial
Data Structures Tutorial
Algorithms Tutorial
Top 100 DSA Interview Questions
DSA-Roadmap[Basic-to-Advanced]
ML & Data Science
Learn Python
Data Science Tutorial
Machine Learning Tutorial
Deep Learning Tutorial
NLP Tutorial
Computer Vision Tutorial
Web Development
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
ReactJS Tutorial
NodeJS Tutorial
Languages
C
C++
Java
R Tutorial
Golang
Interview Corner
Company Interview Corner
Experienced Interviews
Internship Experiences
Practice Company Questions
Competitive Programming
CS Subjects
Operating Systems
DBMS
Computer Networks
Software Engineering
Software Testing
Jobs
Get Hired: Apply for Jobs
Job-a-thon: Hiring Challenge
Corporate Hiring Solutions
Practice
All DSA Problems
Problem of the Day
GFG SDE Sheet
Beginner's DSA Sheet
Love Babbar Sheet
Top 50 Array Problems
Top 50 String Problems
Top 50 DP Problems
Top 50 Graph Problems
Top 50 Tree Problems
Contests
World Cup Hack-A-Thon
GFG Weekly Coding Contest
Job-A-Thon: Hiring Challenge
BiWizard School Contest
All Contests and Events
GBlog
Puzzles
What's New ?
Change Language
Trending Now
Data Structures
Algorithms
Foundational Courses
Data Science
Practice Problem
Python
Machine Learning
JavaScript
Java
C
C++
ReactJS
NodeJS
Web Development
Web Design
Web Browser
CP Live
Aptitude
Puzzles
Projects
DSA
System Design
Software Development
Product Management
SAP
SEO
▲
Similar Topics
DSA
21k+ articles
Arrays
6.4k+ articles
Amazon
1.8k+ articles
Sorting
1.7k+ articles
Linked List
1.1k+ articles
Microsoft
820+ articles
Divide and Conquer
230+ articles
Linked-List-Sorting
50+ articles
Insertion Sort
30+ articles
inversion
30+ articles
Merge Sort
100+ posts
Popular articles
Recent articles
Quick Sort vs Merge Sort
Last Updated: 20 February 2023
Quick sort is an internal algorithm which is based on divide and conquer strategy. In this:The array of elements is divided into parts repeatedly until it is not possible
...read more
Algorithms
Divide and Conquer
Sorting
Merge Sort
Quick Sort
GATE CS
Linked-List-Sorting
DSA
Merge two sorted arrays
Last Updated: 03 October 2023
Given two sorted arrays, the task is to merge them in a sorted manner.Examples:Input: arr1[] = { 1, 3, 4, 5}, arr2[] = {2, 4, 6, 8}Output: arr3[] = {1, 2, 3, 4, 4, 5, 6, 8
...read more
Arrays
Microsoft
Amazon
Goldman Sachs
Snapdeal
Zoho
Linkedin
Quikr
Visa
Synopsys
Brocade
Juniper Networks
Sorting
Mathematical
Amdocs
Merge Sort
Insertion Sort
DSA
TimSort - Data Structures and Algorithms Tutorials
Last Updated: 20 November 2023
Tim Sort is a hybrid sorting algorithm derived from merge sort and insertion sort. It was designed to perform well on many kinds of real-world data. Tim Sort is the defaul
...read more
Sorting
Merge Sort
Insertion Sort
DSA
Similar Topics
DSA
21k+ articles
Arrays
6.4k+ articles
Amazon
1.8k+ articles
Sorting
1.7k+ articles
Linked List
1.1k+ articles
Microsoft
820+ articles
Divide and Conquer
230+ articles
Linked-List-Sorting
50+ articles
Insertion Sort
30+ articles
inversion
30+ articles
Merge K sorted linked lists | Set 1
Last Updated: 30 October 2023
Given K sorted linked lists of size N each, the task is to merge them all maintaining their sorted order.Examples:Input: K = 3, N = 4list1 = 1-3-5-7-NULLlist2 = 2-4-6-8-NU
...read more
Linked List
Amazon
VMWare
Heap
Merge Sort
DSA
Merge two sorted arrays with O(1) extra space
Last Updated: 19 October 2023
We are given two sorted arrays. We need to merge these two arrays such that the initial numbers (after complete sorting) are in the first array and the remaining numbers a
...read more
Arrays
Microsoft
Amazon
Goldman Sachs
Snapdeal
Zoho
Linkedin
Quikr
Synopsys
Brocade
Juniper Networks
Sorting
Mathematical
Amdocs
Merge Sort
Insertion Sort
DSA
Iterative Merge Sort
Last Updated: 30 March 2023
Following is a typical recursive implementation of Merge Sort[tabby title="C++"][sourcecode language="cpp"]// Recursive C++ program for merge sort #includebits/stdc++.husi
...read more
Sorting
Merge Sort
DSA
Merge k sorted arrays | Set 1
Last Updated: 16 February 2023
Given K sorted arrays of size N each, merge them and print the sorted output.Examples:Input:K = 3, N = 4, arr = { {1, 3, 5, 7},{2, 4, 6, 8},{0, 9, 10, 11}}Output: 0 1 2 3
...read more
Arrays
Microsoft
Amazon
Flipkart
VMWare
Citrix
Sorting
Heap
Merge Sort
DSA
Python Program for Merge Sort
Last Updated: 28 August 2023
Merge Sort is a Divide and Conquer algorithm. It divides input array in two halves, calls itself for the two halves and then merges the two sorted halves. The merge() func
...read more
Merge Sort
Python Programs
Merge Sort - Data Structure and Algorithms Tutorials
Last Updated: 28 November 2023
Merge sort is defined as a sorting algorithm that works by dividing an array into smaller subarrays, sorting each subarray, and then merging the sorted subarrays back toge
...read more
Microsoft
Amazon
Oracle
Qualcomm
Goldman Sachs
Snapdeal
Paytm
Target Corporation
Grofers
Sorting
Boomerang Commerce
Merge Sort
DSA
Stable and Unstable Sorting Algorithms
Last Updated: 20 July 2023
Stability is mainly essential when we have key-value pairs with duplicate keys possible (like people's names as keys and their details as values). And we wish to sort thes
...read more
Sorting
Merge Sort
Quick Sort
DSA
Merge Sort for Linked Lists
Last Updated: 02 June 2023
Merge sort is often preferred for sorting a linked list. The slow random-access performance of a linked list makes some other algorithms (such as quicksort) perform poorly
...read more
Linked List
Microsoft
Adobe
Paytm
Accolite
MAQ Software
Sorting
Veritas
Merge Sort
Linked-List-Sorting
DSA
Merge two sorted linked lists
Last Updated: 10 July 2023
AuxiliaryGiven two sorted linked lists consisting of N and Mnodes respectively. The task is to merge both of the lists (in place) and return the head of the merged list.Ex
...read more
Linked List
Microsoft
Amazon
Oracle
Flipkart
Samsung
Belzabar
Accolite
Zoho
MakeMyTrip
Synopsys
Brocade
FactSet
OATS Systems
Merge Sort
DSA
Union and Intersection of two sorted arrays
Last Updated: 09 October 2023
Given two sorted arrays, find their union and intersection.Example:Input: arr1[] = {1, 3, 4, 5, 7} arr2[] = {2, 3, 5, 6}Output: Union : {1, 2, 3, 4, 5, 6, 7} Interse
...read more
Arrays
Merge Sort
DSA
Remove Duplicates from an Unsorted Linked List
Last Updated: 12 September 2023
Given an unsorted Linked List, the task is to remove duplicates from the list.Examples:Input: linked_list = 12 - 11 - 12 - 21 - 41 - 43 - 21Output: 12 - 11 - 21 - 41 - 43E
...read more
Linked List
Amazon
Merge Sort
DSA
Inversion count in Array using Merge Sort
Last Updated: 28 July 2023
Inversion Count for an array indicates - how far (or close) the array is from being sorted. If the array is already sorted, then the inversion count is 0, but if the array
...read more
Arrays
Microsoft
Amazon
Adobe
Flipkart
Myntra
BankBazaar
Divide and Conquer
Sorting
inversion
Merge Sort
Arrays
DSA
1
2
3
4
5
6
7
8
>>
Last
1
2
3
4
5
6
>>
Last
1
2
3
4
>>
Last
Courses
1090k+ interested Geeks
Data Structures and Algorithms - Self Paced
Explore
39k+ interested Geeks
DSA for Interview Preparation
Explore
202k+ interested Geeks
Data Structures & Algorithms in Python - Self Paced
Explore
Recently Published
Top 10 Power BI Project Ideas For Data Science
Read
Top 10 VS Code Extensions For Python Django
Read
Python vs Java Full Stack Developer
Read
New Games inspired by Google generative AI
Read
100 Days of GATE Data Science & AI – A Complete Guide For Beginners
Read
Top 10 VS Code Extensions For Data Science
Read
7 Best React Design Patterns That Every Developer Should Know
Read
Google Bard AI can now watch YouTube videos and answer your questions
Read
Top 10 Visual Studio Code Alternatives
Read