- Trending Categories
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
Sudhir sharma has Published 1206 Articles
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
527 Views
In this problem, we are given a binary tree and a node value. Our task is to print the preorder successor of the node.Binary Tree is a special type of tree in which each root node can have maximum 2 child nodes.Preorder Traversal is a way to traverse nodes of ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
152 Views
In this problem, we are given an N-ary Tree. Our task is to print the preorder traversal of the tree.First, let’s learn some basic terminologies, N-ary Tree is a tree in which all nodes can have at max N child nodes. Example 2-ary (binary) tree has max 2 child nodes.Preorder ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
545 Views
In this problem, we are given an array. Our task is to return the greatest element that precedes the current element in the array otherwise print -1.Let’s take an example to understand the problemInput: {6, 2, 7, 1, 5, 3} Output: -1, 6, -1, 7, 7, 7To solve this problem, ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
237 Views
In this problem, we are given an integer n. Our task is to check weather the preceding number is equal to 1’s complement of the number.Let’s take a few examples to understand our problemInput: 12 Output: No Explanation: (12)10 = (1100)2 Preceding number 11 = (1011)2 1’s complement of 12 ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
97 Views
In this problem, we are given an integer n. Our task is to print the largest number less than n which can be formed by changing one set bit of the binary representation of the number.Let’s take an example to understand the problemInput: n = 3 Output: 2 Explanation: (3)10 ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
4K+ Views
Prim’s Algorithm is a greedy method that is used to find minimum spanning tree for a given weighted undirected graph.Weighted graph is a graph that has all edges with weight values.Undirected graph is a special type of graph in which all edges are bidirectional.Minimum spanning tree is a subset that ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
1K+ Views
In this problem, we are given a number N and our task is to check whether it is a prime number or not.Primality test s the algorithm that is used to check whether the given number is prime or not.Prime number is a number which can be divided by itself ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
60 Views
In this problem, we are given a number N. our task is to check whether the sum of digits at odd place of the number gives a prime number or not.Primality Test is the algorithm that is used to check whether the given number is prime or not.Let’s take an ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
11K+ Views
Primary KeyPrimary Key is a column that is used to uniquely identify each tuple of the table.It is used to add integrity constraints to the table. Only one primary key is allowed to be used in a table. Duplicate and NULL (empty) values are not valid in the case of ... Read More
![sudhir sharma](https://www.tutorialspoint.com/assets/profiles/125719/profile/60_65058-1565947418.jpg)
sudhir sharma
10K+ Views
Prime Factor is a prime number which is the factor of the given number.Factor of a number are the numbers that are multiplied to get the given number.Prime Factorisation is the process of recursively dividing the number with its prime factors to find all the prime factors of the number.Example ... Read More