Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • DSA
  • Interview Problems on Graph
  • Practice Graph
  • MCQs on Graph
  • Graph Tutorial
  • Graph Representation
  • Graph Properties
  • Types of Graphs
  • Graph Applications
  • BFS on Graph
  • DFS on Graph
  • Graph VS Tree
  • Transpose Graph
  • Dijkstra's Algorithm
  • Minimum Spanning Tree
  • Prim’s Algorithm
  • Topological Sorting
  • Floyd Warshall Algorithm
  • Strongly Connected Components
  • Advantages & Disadvantages
Open In App
Next Article:
Dijkstra's Algorithm to find Shortest Paths from a Source to all
Next article icon

Dijkstra's Algorithm to find Shortest Paths from a Source to all

Last Updated : 21 May, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report
Try it on GfG Practice
redirect icon

Given a weighted undirected graph represented as an edge list and a source vertex src, find the shortest path distances from the source vertex to all other vertices in the graph. The graph contains V vertices, numbered from 0 to V - 1.

Note: The given graph does not contain any negative edge.

Examples:

Input: src = 0, V = 5, edges[][] = [[0, 1, 4], [0, 2, 8], [1, 4, 6], [2, 3, 2], [3, 4, 10]]

1
Graph with 5 node

Output: 0 4 8 10 10
Explanation: Shortest Paths:
0 to 1 = 4. 0 → 1
0 to 2 = 8. 0 → 2
0 to 3 = 10. 0 → 2 → 3
0 to 4 = 10. 0 → 1 → 4

Dijkstra’s Algorithm using Min Heap - O(E*logV) Time and O(V) Space

In Dijkstra's Algorithm, the goal is to find the shortest distance from a given source node to all other nodes in the graph. As the source node is the starting point, its distance is initialized to zero. From there, we iteratively pick the unprocessed node with the minimum distance from the source, this is where a min-heap (priority queue) or a set is typically used for efficiency. For each picked node u, we update the distance to its neighbors v using the formula: dist[v] = dist[u] + weight[u][v], but only if this new path offers a shorter distance than the current known one. This process continues until all nodes have been processed.

Step-by-Step Implementation

  1. Set dist[source]=0 and all other distances as infinity.
  2. Push the source node into the min heap as a pair <distance, node> → i.e., <0, source>.
  3. Pop the top element (node with the smallest distance) from the min heap.
    1. For each adjacent neighbor of the current node:
    2. Calculate the distance using the formula:
      dist[v] = dist[u] + weight[u][v]
          If this new distance is shorter than the current dist[v], update it.
          Push the updated pair <dist[v], v> into the min heap
  4. Repeat step 3 until the min heap is empty.
  5. Return the distance array, which holds the shortest distance from the source to all nodes.

Illustration:


C++
//Driver Code Starts #include <iostream> #include <vector> #include <queue> #include <climits> using namespace std;  // Function to construct adjacency  vector<vector<vector<int>>> constructAdj(vector<vector<int>>                               &edges, int V) {                                       // adj[u] = list of {v, wt}     vector<vector<vector<int>>> adj(V);       for (const auto &edge : edges) {         int u = edge[0];         int v = edge[1];         int wt = edge[2];         adj[u].push_back({v, wt});         adj[v].push_back({u, wt});      }          return adj; }  //Driver Code Ends  // Returns shortest distances from src to all other vertices vector<int> dijkstra(int V, vector<vector<int>> &edges, int src){          // Create adjacency list     vector<vector<vector<int>>> adj = constructAdj(edges, V);      // Create a priority queue to store vertices that     // are being preprocessed.     priority_queue<vector<int>, vector<vector<int>>,                     greater<vector<int>>> pq;      // Create a vector for distances and initialize all     // distances as infinite     vector<int> dist(V, INT_MAX);      // Insert source itself in priority queue and initialize     // its distance as 0.     pq.push({0, src});     dist[src] = 0;      // Looping till priority queue becomes empty (or all     // distances are not finalized)      while (!pq.empty()){                  // The first vertex in pair is the minimum distance         // vertex, extract it from priority queue.         int u = pq.top()[1];         pq.pop();          // Get all adjacent of u.         for (auto x : adj[u]){                          // Get vertex label and weight of current             // adjacent of u.             int v = x[0];             int weight = x[1];              // If there is shorter path to v through u.             if (dist[v] > dist[u] + weight)             {                 // Updating distance of v                 dist[v] = dist[u] + weight;                 pq.push({dist[v], v});             }         }     }      return dist; }  //Driver Code Starts  // Driver program to test methods of graph class int main(){     int V = 5;     int src = 0;      // edge list format: {u, v, weight}     vector<vector<int>> edges = {{0, 1, 4}, {0, 2, 8}, {1, 4, 6},                                   {2, 3, 2}, {3, 4, 10}};      vector<int> result = dijkstra(V, edges, src);      // Print shortest distances in one line     for (int dist : result)         cout << dist << " ";       return 0; }  //Driver Code Ends 
Java
//Driver Code Starts import java.util.*;  class GfG {      // Construct adjacency list using ArrayList of ArrayList     static ArrayList<ArrayList<ArrayList<Integer>>>                               constructAdj(int[][] edges, int V) {         // Initialize the adjacency list         ArrayList<ArrayList<ArrayList<Integer>>>                                     adj = new ArrayList<>();          for (int i = 0; i < V; i++) {             adj.add(new ArrayList<>());         }          // Fill the adjacency list from edges         for (int[] edge : edges) {             int u = edge[0];             int v = edge[1];             int wt = edge[2];              // Add edge from u to v             ArrayList<Integer> e1 = new ArrayList<>();             e1.add(v);             e1.add(wt);             adj.get(u).add(e1);              // Since the graph is undirected, add edge from v to u             ArrayList<Integer> e2 = new ArrayList<>();             e2.add(u);             e2.add(wt);             adj.get(v).add(e2);         }          return adj;     }  //Driver Code Ends      // Returns shortest distances from src to all other vertices     static int[] dijkstra(int V, int[][] edges, int src) {                  // Create adjacency list         ArrayList<ArrayList<ArrayList<Integer>>> adj =                                 constructAdj(edges, V);          // PriorityQueue to store vertices to be processed         // Each element is a pair: [distance, node]         PriorityQueue<ArrayList<Integer>> pq =            new PriorityQueue<>(Comparator.comparingInt(a -> a.get(0)));          // Create a distance array and initialize all distances as infinite         int[] dist = new int[V];         Arrays.fill(dist, Integer.MAX_VALUE);          // Insert source with distance 0         dist[src] = 0;         ArrayList<Integer> start = new ArrayList<>();                  start.add(0);         start.add(src);         pq.offer(start);          // Loop until the priority queue is empty         while (!pq.isEmpty()) {                          // Get the node with the minimum distance             ArrayList<Integer> curr = pq.poll();             int d = curr.get(0);             int u = curr.get(1);              // Traverse all adjacent vertices of the current node             for (ArrayList<Integer> neighbor : adj.get(u)) {                 int v = neighbor.get(0);                 int weight = neighbor.get(1);                  // If there is a shorter path to v through u                 if (dist[v] > dist[u] + weight) {                     // Update distance of v                     dist[v] = dist[u] + weight;                      // Add updated pair to the queue                     ArrayList<Integer> temp = new ArrayList<>();                     temp.add(dist[v]);                     temp.add(v);                     pq.offer(temp);                 }             }         }          // Return the shortest distance array         return dist;     }  //Driver Code Starts      // Driver program to test methods of graph class     public static void main(String[] args) {         int V = 5;               int src = 0;              // Edge list format: {u, v, weight}         int[][] edges = {             {0, 1, 4}, {0, 2, 8}, {1, 4, 6},             {2, 3, 2}, {3, 4, 10}         };          // Get shortest path distances         int[] result = dijkstra(V, edges, src);          // Print shortest distances in one line         for (int d : result)             System.out.print(d + " ");     } }  //Driver Code Ends 
Python
#Driver Code Starts import heapq import sys  # Function to construct adjacency  def constructAdj(edges, V):          # adj[u] = list of [v, wt]     adj = [[] for _ in range(V)]      for edge in edges:         u, v, wt = edge         adj[u].append([v, wt])         adj[v].append([u, wt])      return adj  #Driver Code Ends  # Returns shortest distances from src to all other vertices def dijkstra(V, edges, src):     # Create adjacency list     adj = constructAdj(edges, V)      # Create a priority queue to store vertices that     # are being preprocessed.     pq = []          # Create a list for distances and initialize all     # distances as infinite     dist = [sys.maxsize] * V      # Insert source itself in priority queue and initialize     # its distance as 0.     heapq.heappush(pq, [0, src])     dist[src] = 0      # Looping till priority queue becomes empty (or all     # distances are not finalized)      while pq:         # The first vertex in pair is the minimum distance         # vertex, extract it from priority queue.         u = heapq.heappop(pq)[1]          # Get all adjacent of u.         for x in adj[u]:             # Get vertex label and weight of current             # adjacent of u.             v, weight = x[0], x[1]              # If there is shorter path to v through u.             if dist[v] > dist[u] + weight:                 # Updating distance of v                 dist[v] = dist[u] + weight                 heapq.heappush(pq, [dist[v], v])      # Return the shortest distance array     return dist  #Driver Code Starts  # Driver program to test methods of graph class if __name__ == "__main__":     V = 5     src = 0      # edge list format: {u, v, weight}     edges =[[0, 1, 4], [0, 2, 8], [1, 4, 6], [2, 3, 2], [3, 4, 10]];      result = dijkstra(V, edges, src)      # Print shortest distances in one line     print(' '.join(map(str, result)))  #Driver Code Ends 
C#
//Driver Code Starts using System; using System.Collections.Generic;  class GfG {      // MinHeap Node (stores vertex and its distance)     class HeapNode {         public int Vertex;         public int Distance;          public HeapNode(int v, int d) {             Vertex = v;             Distance = d;         }     }      // Custom MinHeap class     class MinHeap {         private List<HeapNode> heap = new List<HeapNode>();          public int Count => heap.Count;          private void Swap(int i, int j) {             var temp = heap[i];             heap[i] = heap[j];             heap[j] = temp;         }          public void Push(HeapNode node) {             heap.Add(node);             int i = heap.Count - 1;              while (i > 0) {                 int parent = (i - 1) / 2;                 if (heap[parent].Distance <= heap[i].Distance)                     break;                 Swap(i, parent);                 i = parent;             }         }          public HeapNode Pop() {             if (heap.Count == 0) return null;              var root = heap[0];             heap[0] = heap[heap.Count - 1];             heap.RemoveAt(heap.Count - 1);             Heapify(0);              return root;         }          private void Heapify(int i) {             int smallest = i;             int left = 2 * i + 1;             int right = 2 * i + 2;              if (left < heap.Count && heap[left].Distance < heap[smallest].Distance)                 smallest = left;              if (right < heap.Count && heap[right].Distance < heap[smallest].Distance)                 smallest = right;              if (smallest != i) {                 Swap(i, smallest);                 Heapify(smallest);             }         }     }      // Build adjacency list from edge list     static List<int[]>[] constructAdj(int[,] edges, int V) {         List<int[]>[] adj = new List<int[]>[V];         for (int i = 0; i < V; i++)             adj[i] = new List<int[]>();          int E = edges.GetLength(0);         for (int i = 0; i < E; i++) {             int u = edges[i, 0];             int v = edges[i, 1];             int wt = edges[i, 2];              adj[u].Add(new int[] { v, wt });             adj[v].Add(new int[] { u, wt }); // Undirected graph         }          return adj;     }  //Driver Code Ends      // Dijkstra's algorithm using custom MinHeap     static int[] dijkstra(int V, int[,] edges, int src) {         var adj = constructAdj(edges, V);         int[] dist = new int[V];         bool[] visited = new bool[V];          for (int i = 0; i < V; i++)             dist[i] = int.MaxValue;          dist[src] = 0;         MinHeap pq = new MinHeap();         pq.Push(new HeapNode(src, 0));          while (pq.Count > 0) {             HeapNode node = pq.Pop();             int u = node.Vertex;              if (visited[u]) continue;             visited[u] = true;              foreach (var neighbor in adj[u]) {                 int v = neighbor[0];                 int weight = neighbor[1];                  if (!visited[v] && dist[u] + weight < dist[v]) {                     dist[v] = dist[u] + weight;                     pq.Push(new HeapNode(v, dist[v]));                 }             }         }          return dist;     }  //Driver Code Starts      // Main method     static void Main(string[] args) {         int V = 5;         int src = 0;          int[,] edges = {             {0, 1, 4},             {0, 2, 8},             {1, 4, 6},             {2, 3, 2},             {3, 4, 10}         };          int[] result = dijkstra(V, edges, src);          foreach (int d in result)             Console.Write(d + " ");     } }  //Driver Code Ends 
JavaScript
//Driver Code Starts  class MinHeap {     constructor() {         this.heap = [];     }      push(val) {         this.heap.push(val);         this._heapifyUp(this.heap.length - 1);     }      pop() {         if (this.size() === 0) return null;         if (this.size() === 1) return this.heap.pop();          const min = this.heap[0];         this.heap[0] = this.heap.pop();         this._heapifyDown(0);         return min;     }      size() {         return this.heap.length;     }      _heapifyUp(index) {         while (index > 0) {             const parent = Math.floor((index - 1) / 2);             if (this.heap[parent][0] <= this.heap[index][0]) break;             [this.heap[parent], this.heap[index]] = [this.heap[index],                                  this.heap[parent]];             index = parent;         }     }      _heapifyDown(index) {         const n = this.heap.length;         while (true) {             let smallest = index;             const left = 2 * index + 1;             const right = 2 * index + 2;              if (left < n && this.heap[left][0] < this.heap[smallest][0]){                 smallest = left;             }                          if (right < n && this.heap[right][0] < this.heap[smallest][0]){                 smallest = right;             }              if (smallest === index) break;             [this.heap[smallest], this.heap[index]] =                                [this.heap[index], this.heap[smallest]];             index = smallest;         }     } }  // Function to construct adjacency  function constructAdj(edges, V) {     // adj[u] = list of [v, wt]     const adj = Array.from({ length: V }, () => []);      for (const edge of edges) {         const [u, v, wt] = edge;         adj[u].push([v, wt]);         adj[v].push([u, wt]);      }      return adj; }  //Driver Code Ends  // Returns shortest distances from src to all other vertices function dijkstra(V, edges, src) {          // Create adjacency list     const adj = constructAdj(edges, V);      // Create a min heap to store <distance, node>     const minHeap = new MinHeap();      // Create an array for distances and initialize all distances as infinity     const dist = Array(V).fill(Number.MAX_SAFE_INTEGER);      // Push the source node with distance 0     minHeap.push([0, src]);     dist[src] = 0;      // Process the heap     while (minHeap.size() > 0) {         const [d, u] = minHeap.pop();          // Traverse all adjacent of u         for (const [v, weight] of adj[u]) {             if (dist[v] > dist[u] + weight) {                 dist[v] = dist[u] + weight;                 minHeap.push([dist[v], v]);             }         }     }      return dist; }  //Driver Code Starts  // Driver code const V = 5; const src = 0;  // edge list format: [u, v, weight] const edges = [[0, 1, 4], [0, 2, 8], [1, 4, 6], [2, 3, 2], [3, 4, 10]];  const result = dijkstra(V, edges, src);  // Print shortest distances in one line console.log(result.join(' '));  //Driver Code Ends 

Output
0 4 8 10 10 

Time Complexity: O(E*logV), Where E is the number of edges and V is the number of vertices.
Auxiliary Space: O(V), Where V is the number of vertices, We do not count the adjacency list in auxiliary space as it is necessary for representing the input graph.

Problems based on Shortest Path

  • Shortest Path in Directed Acyclic Graph
  • Shortest path with one curved edge in an undirected Graph
  • Minimum Cost Path
  • Path with smallest difference between consecutive cells
  • Print negative weight cycle in a Directed Graph
  • 1st to Kth shortest path lengths in given Graph
  • Shortest path in a Binary Maze
  • Minimum steps to reach target by a Knight
  • Number of ways to reach at destination in shortest time
  • Snake and Ladder Problem
  • Word Ladder

Next Article
Dijkstra's Algorithm to find Shortest Paths from a Source to all

K

kartik
Improve
Article Tags :
  • Graph
  • Greedy
  • DSA
  • Amazon
  • Adobe
  • Morgan Stanley
  • Dijkstra
  • Samsung
  • Cisco
  • Accolite
  • Vizury Interactive Solutions
  • Shortest Path
Practice Tags :
  • Accolite
  • Adobe
  • Amazon
  • Cisco
  • Morgan Stanley
  • Samsung
  • Vizury Interactive Solutions
  • Graph
  • Greedy
  • Shortest Path

Similar Reads

    Graph Algorithms
    Graph is a non-linear data structure like tree data structure. The limitation of tree is, it can only represent hierarchical data. For situations where nodes or vertices are randomly connected with each other other, we use Graph. Example situations where we use graph data structure are, a social net
    3 min read
    Introduction to Graph Data Structure
    Graph Data Structure is a non-linear data structure consisting of vertices and edges. It is useful in fields such as social network analysis, recommendation systems, and computer networks. In the field of sports data science, graph data structure can be used to analyze and understand the dynamics of
    15+ min read
    Graph and its representations
    A Graph is a non-linear data structure consisting of vertices and edges. The vertices are sometimes also referred to as nodes and the edges are lines or arcs that connect any two nodes in the graph. More formally a Graph is composed of a set of vertices( V ) and a set of edges( E ). The graph is den
    12 min read
    Types of Graphs with Examples
    A graph is a mathematical structure that represents relationships between objects by connecting a set of points. It is used to establish a pairwise relationship between elements in a given set. graphs are widely used in discrete mathematics, computer science, and network theory to represent relation
    9 min read
    Basic Properties of a Graph
    A Graph is a non-linear data structure consisting of nodes and edges. The nodes are sometimes also referred to as vertices and the edges are lines or arcs that connect any two nodes in the graph. The basic properties of a graph include: Vertices (nodes): The points where edges meet in a graph are kn
    4 min read
    Applications, Advantages and Disadvantages of Graph
    Graph is a non-linear data structure that contains nodes (vertices) and edges. A graph is a collection of set of vertices and edges (formed by connecting two vertices). A graph is defined as G = {V, E} where V is the set of vertices and E is the set of edges. Graphs can be used to model a wide varie
    7 min read
    Transpose graph
    Transpose of a directed graph G is another directed graph on the same set of vertices with all of the edges reversed compared to the orientation of the corresponding edges in G. That is, if G contains an edge (u, v) then the converse/transpose/reverse of G contains an edge (v, u) and vice versa. Giv
    9 min read
    Difference Between Graph and Tree
    Graphs and trees are two fundamental data structures used in computer science to represent relationships between objects. While they share some similarities, they also have distinct differences that make them suitable for different applications. Difference Between Graph and Tree What is Graph?A grap
    2 min read

    BFS and DFS on Graph

    Breadth First Search or BFS for a Graph
    Given a undirected graph represented by an adjacency list adj, where each adj[i] represents the list of vertices connected to vertex i. Perform a Breadth First Search (BFS) traversal starting from vertex 0, visiting vertices from left to right according to the adjacency list, and return a list conta
    15+ min read
    Depth First Search or DFS for a Graph
    In Depth First Search (or DFS) for a graph, we traverse all adjacent vertices one by one. When we traverse an adjacent vertex, we completely finish the traversal of all vertices reachable through that adjacent vertex. This is similar to a tree, where we first completely traverse the left subtree and
    13 min read
    Applications, Advantages and Disadvantages of Depth First Search (DFS)
    Depth First Search is a widely used algorithm for traversing a graph. Here we have discussed some applications, advantages, and disadvantages of the algorithm. Applications of Depth First Search:1. Detecting cycle in a graph: A graph has a cycle if and only if we see a back edge during DFS. So we ca
    4 min read
    Applications, Advantages and Disadvantages of Breadth First Search (BFS)
    We have earlier discussed Breadth First Traversal Algorithm for Graphs. Here in this article, we will see the applications, advantages, and disadvantages of the Breadth First Search. Applications of Breadth First Search: 1. Shortest Path and Minimum Spanning Tree for unweighted graph: In an unweight
    4 min read
    Iterative Depth First Traversal of Graph
    Given a directed Graph, the task is to perform Depth First Search of the given graph.Note: Start DFS from node 0, and traverse the nodes in the same order as adjacency list.Note : There can be multiple DFS traversals of a graph according to the order in which we pick adjacent vertices. Here we pick
    10 min read
    BFS for Disconnected Graph
    In the previous post, BFS only with a particular vertex is performed i.e. it is assumed that all vertices are reachable from the starting vertex. But in the case of a disconnected graph or any vertex that is unreachable from all vertex, the previous implementation will not give the desired output, s
    14 min read
    Transitive Closure of a Graph using DFS
    Given a directed graph, find out if a vertex v is reachable from another vertex u for all vertex pairs (u, v) in the given graph. Here reachable means that there is a path from vertex u to v. The reach-ability matrix is called transitive closure of a graph. For example, consider below graph: GraphTr
    8 min read
    Difference between BFS and DFS
    Breadth-First Search (BFS) and Depth-First Search (DFS) are two fundamental algorithms used for traversing or searching graphs and trees. This article covers the basic difference between Breadth-First Search and Depth-First Search.Difference between BFS and DFSParametersBFSDFSStands forBFS stands fo
    2 min read

    Cycle in a Graph

    Detect Cycle in a Directed Graph
    Given the number of vertices V and a list of directed edges, determine whether the graph contains a cycle or not.Examples: Input: V = 4, edges[][] = [[0, 1], [0, 2], [1, 2], [2, 0], [2, 3]]Cycle: 0 → 2 → 0 Output: trueExplanation: The diagram clearly shows a cycle 0 → 2 → 0 Input: V = 4, edges[][] =
    15+ min read
    Detect cycle in an undirected graph
    Given an undirected graph, the task is to check if there is a cycle in the given graph.Examples:Input: V = 4, edges[][]= [[0, 1], [0, 2], [1, 2], [2, 3]]Undirected Graph with 4 vertices and 4 edgesOutput: trueExplanation: The diagram clearly shows a cycle 0 → 2 → 1 → 0Input: V = 4, edges[][] = [[0,
    8 min read
    Detect Cycle in a directed graph using colors
    Given a directed graph represented by the number of vertices V and a list of directed edges, determine whether the graph contains a cycle.Your task is to implement a function that accepts V (number of vertices) and edges (an array of directed edges where each edge is a pair [u, v]), and returns true
    9 min read
    Detect a negative cycle in a Graph | (Bellman Ford)
    Given a directed weighted graph, your task is to find whether the given graph contains any negative cycles that are reachable from the source vertex (e.g., node 0).Note: A negative-weight cycle is a cycle in a graph whose edges sum to a negative value.Example:Input: V = 4, edges[][] = [[0, 3, 6], [1
    15+ min read
    Cycles of length n in an undirected and connected graph
    Given an undirected and connected graph and a number n, count the total number of simple cycles of length n in the graph. A simple cycle of length n is defined as a cycle that contains exactly n vertices and n edges. Note that for an undirected graph, each cycle should only be counted once, regardle
    10 min read
    Detecting negative cycle using Floyd Warshall
    We are given a directed graph. We need compute whether the graph has negative cycle or not. A negative cycle is one in which the overall sum of the cycle comes negative. Negative weights are found in various applications of graphs. For example, instead of paying cost for a path, we may get some adva
    12 min read
    Clone a Directed Acyclic Graph
    A directed acyclic graph (DAG) is a graph which doesn't contain a cycle and has directed edges. We are given a DAG, we need to clone it, i.e., create another graph that has copy of its vertices and edges connecting them. Examples: Input : 0 - - - > 1 - - - -> 4 | / \ ^ | / \ | | / \ | | / \ |
    12 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences