- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Sunidhi Bansal has Published 1101 Articles
Sunidhi Bansal
776 Views
The task involves printing leaf nodes of a binary tree at given level k which is specified by the user.Leaf nodes are the end nodes whose left and right pointer is NULL which means that particular node is not a parent node.ExampleInput : 11 22 33 66 44 88 77 ... Read More
Sunidhi Bansal
369 Views
The task is to print the left nodes of a given binary tree. Firstly user will insert data hence generating binary tree and than print left view of the tree so formed.Every node can have at most 2 child so here the program must traverse only the left pointer associated ... Read More
Sunidhi Bansal
91 Views
Given an array arr[m] with m number of integers and n, which is the value to be added in an array and r queries are given with some start and end. For each query we have to add value n from the start till the end of the limit in ... Read More
Sunidhi Bansal
2K+ Views
Given with the matrix of n x n the task is to print that matrix of n x n in lower triangular pattern.Lower triangular matrix is a matrix which has elements below the principle diagonal including the principle diagonal elements and rest elements as zero.Let’s understand this with help of ... Read More
Sunidhi Bansal
328 Views
Given with an array of size n x n and the task is to print the matrix elements of integer type diagonally downwards.Diagonally downwards means printing the array of any size of n x n in diagonally moving downward like in the figure given below −Firstly it will print 1 ... Read More
Sunidhi Bansal
156 Views
You are provided with a string str with some length n. Print the position of every element of the string so it can form a palindrome, else print a message “No palindrome” on screen.What is palindrome?Palindrome is a word, sequence of characters which reads same from the reverse or backward ... Read More
Sunidhi Bansal
89 Views
Given a number n, we have to print the steps to make the number as in form of 2^X-1 by using Xor operation.We should XOR the number with any 2^M-1, where M is chosen by you, at odd step. At even step increment the number by 1Keep performing the step until ... Read More
Sunidhi Bansal
219 Views
We will be given a connected graph with N vertices and M edges. So we have to print the lexicographically smallest DFS of the graph starting from 1.Vertices should be numbered from 1 to NExampleInput: N = 5 M =5 edge(1, 4, arr) edge(3, 4, arr) edge(5, ... Read More
Sunidhi Bansal
377 Views
We will be given a connected graph with N vertices M edges. So we have to print the lexicographically smallest BFS of the graph starting from 1.Lexicographically means in order starting from the given point till the end point is found.Vertices should be numbered from 1 to NExampleInput: N = ... Read More
Sunidhi Bansal
728 Views
Given with a string program must print the string in ‘X’ format. For reference, see the image given below.Here, one variable can be used to print from left right(“i”) and other variable can used to print from right to left(“j”) and we can take other variable k which is used ... Read More
To Continue Learning Please Login
Login with Google