Skip to content
Gblog Crossword Puzzle Of The Week #3 (for Database and Queries)
In this issue of Crossword Puzzle of the week, we will dive into the topics of Database and Queries. The solution to the crossword puzzle… Read More
Write a function that moves the last node to the front in a given Singly Linked List. Examples: Input: 1->2->3->4->5Output: 5->1->2->3->4 Input: 3->8->1->5->7->12Output: 12->3->8->1->5->7  … Read More
Assume the structure of a Linked List node is as follows.  C++ struct Node {   int data;   struct Node *next; };    // This code… Read More
Following questions have been asked in GATE CS 2010 exam. 1. What does the following program print? #include<stdio.h> void f(int *p, int *q) {   p… Read More
For the below example tree, all root-to-leaf paths are: 10 –> 8 –> 3 10 –> 8 –> 5 10 –> 2 –> 2 Recommended… Read More
Let us consider the below traversals: Inorder sequence: D B E A F C  Preorder sequence: A B D E C F Recommended Practice Construct… Read More
Using sizeof directly to find the size of arrays can result in an error in the code, as array parameters are treated as pointers. Consider… Read More
Given an expression string exp, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are correct… Read More
  Given an array arr[] of integers, find out the maximum difference between any two elements such that larger element appears after the smaller number. … Read More
Following questions have been asked in GATE CS 2005 exam.  1. Which one of the following is a key factor for preferring B-trees to binary… Read More
Given a binary tree and a number, return true if the tree has a root-to-leaf path such that adding up all the values along the… Read More
  Using Morris Traversal, we can traverse the tree without using stack and recursion. The idea of Morris Traversal is based on Threaded Binary Tree.… Read More
  Using Stack is the obvious way to traverse tree without recursion. Below is an algorithm for traversing binary tree using stack. See this for… Read More
Given a binary matrix, find out the maximum size square sub-matrix with all 1s. For example, consider the below binary matrix. Recommended: Please solve it… Read More
Given a binary matrix, find out the maximum size square sub-matrix with all 1s. For example, consider the below binary matrix. Recommended: Please solve it… Read More
Given a binary matrix, find out the maximum size square sub-matrix with all 1s. For example, consider the below binary matrix. Recommended: Please solve it… Read More

Start Your Coding Journey Now!