geeksforgeeks
search icon
  • Courses
  • Tutorials
  • Practice
  • Jobs
  • DSA
  • Practice Problems
  • C
  • C++
  • Java
  • Python
  • JavaScript
  • Data Science
  • Machine Learning
  • Courses
  • Linux
  • DevOps
Invert Binary Tree - Change to Mirror TreeGiven the root of a binary tree, convert the binary tree to its Mirror tree.Note: Mirror of a Binary Tree T is another Binary Tree M(T) with left and right children of all... Read More
TreeDSATreesMirror TreeConvert to MirrorGet the MirrorMicrosofteBayAmazonAdobeMorgan StanleySamsungVMWareMyntraBelzabarSnapdealPaytmAccoliteSAP Labstree-traversalOla CabsAmazon-QuestionSnapdeal-QuestionPaytm-QuestionMyntra-QuestioneBay-QuestionProp-Tiger-QuestionBelzabar-QuestionOLA-QuestionVMWare-Questioncpp-queue
Write a program to Delete a TreeTo delete a tree, we must traverse all the nodes of the tree and delete them one by one. So, which traversal we should use - inorder traversal, preorder traversal, or the ... Read More
TreeDSATreesDelete Treetree-traversal
Maximum Depth or Height of a Binary TreeGiven the root of a binary tree, find the maximum depth of the tree. The maximum depth or height of the tree is the number of edges in the tree from the root to the deepes... Read More
TreeDSATreesHeight of a TreeAmazonVMWareCadence IndiaSnapdealZohoMakeMyTripSynopsystree-traversalMonotype SolutionsCouponDuniaFreeChargeFactSetTeradata
Check if Two Trees are IdenticalGiven the roots r1 and r2 of two binary trees, determine whether they are identical.Two trees are considered identical if they have the same structure and the same node va... Read More
TreeDSATreesMicrosoftAmazontree-traversal
Size of a Binary TreeGiven a binary tree, find the size of the tree. The size of a tree is the number of nodes present in the tree. Examples:Input: Output: 6Explanation: The number of nodes in... Read More
TreeDSASize of a Tree
Tree Traversal TechniquesTree traversal refers to the process of visiting or accessing each node of a tree exactly once in a specific order. Unlike linear data structures such as arrays, linked li... Read More
TreeDSATreesInorder TraversalPreorder TraversalPostOrder TraversalSnapdealtree-traversalTutorials
8 queen problemGiven an 8x8 chessboard, the task is to place 8 queens on the board such that no 2 queens threaten each other. Return a matrix of size 8x8, where 1 represents queen and 0 ... Read More
BacktrackingDSAchessboard-problems
Change/add only one character and print '*' exactly 20 timesIn the below code, change/add only one character and print '*' exactly 20 times.int main(){ int i, n = 20; for (i = 0; i n; i--) printf("*"); ... Read More
C++c-puzzle
Condition To Print "HelloWorld"What should be the "condition" so that the following code snippet prints both HelloWorld! if "condition" printf ("Hello"); else printf("World"... Read More
C++c-puzzle
Power SetPower Set P(S) of a set S is the set of all subsets of S. For example S = {a, b, c} then P(s) = {{}, {a}, {b}, {c}, {a,b}, {a, c}, {b, c}, {a, b, c}}. If S has n element... Read More
MathematicalDSASnapdeal
Find the Missing NumberGiven an array arr[] of size n-1 with distinct integers in the range of [1, n]. This array represents a permutation of the integers from 1 to n with one element missing. F... Read More
SearchingDSAArraysMicrosoftAmazonMorgan StanleyQualcommSamsungCiscoAccolitePayuVisaOla CabsBitwise-XORlimited-range-elements
Implement Your Own sizeofHere is an implementation. c #includestdio.h#define my_sizeof(type) (char *)(type+1)-(char*)(type)int main(){ double x; printf(%ld, my_sizeof(x)); get... Read More
C++c-puzzle
PHP Program for Largest Sum Contiguous SubarrayWrite an efficient program to find the sum of contiguous subarray within a one-dimensional array of numbers that has the largest sum.  Recommended: Please solve it on “PRA... Read More
Web TechnologiesPHPPHP Programs
C# Program for Largest Sum Contiguous SubarrayWrite an efficient program to find the sum of contiguous subarray within a one-dimensional array of numbers that has the largest sum.Recommended: Please solve it on “PRACT... Read More
C#
Python Program for Largest Sum Contiguous SubarrayWrite an efficient program to find the sum of contiguous subarray within a one-dimensional array of numbers that has the largest sum.Recommended: Please solve it on “PRACT... Read More
Python
1

...

12154121551215612157
GeeksforGeeks
location
Corporate & Communications Address:
A-143, 6th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
location
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play StoreGFG App on App Store
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • Careers
  • Contact Us
  • Corporate Solution
  • Campus Training Program
  • Explore
  • POTD
  • Practice Problems
  • Blogs
  • Upskill Courses
  • Connect
  • Tutorials
  • Programming Languages
  • DSA
  • Web Technology
  • AI, ML & Data Science
  • DevOps
  • CS Core Subjects
  • GATE
  • School Subjects
  • Software and Tools
  • Courses
  • ML and Data Science
  • DSA and Placements
  • Web Development
  • Data Science
  • Programming Languages
  • DevOps & Cloud
  • GATE
  • MongoDB Certifications
  • Preparation Corner
  • Interview Corner
  • Aptitude
  • Puzzles
  • GfG 160
  • System Design
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved