- 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
Dev Prakash Sharma has Published 556 Articles
Dev Prakash Sharma
1K+ Views
Let’s suppose we have given a square matrix of N×N. The task is to rotate the matrix counterclockwise. For example, Input-1 −N = 3 matrix[ ][ ] = [ [1 2 3], [4 5 6], [7 8 9] ]Output −3 6 9 2 5 8 1 4 ... Read More
Dev Prakash Sharma
1K+ Views
Given a string, the task is to reverse all the vowels present in the given string. For example, Input-1 −a = “tutor”Output −toturExplanation − Reversing the string “tutor” will generate the output as “totur.Input-2 −a = “mathematics”Output −mithametacsExplanation − Reversing the string “mathematics” will generate the output as “mithametacs”.Approach to ... Read More
Dev Prakash Sharma
998 Views
Given an integer N, the task is to replace all the 0’s that appear in the number with ‘5’. However, the number with leading ‘0’ cannot be replaced with ‘5’ as it remains unchanged. For example, Input-1 −N= 1007Output −1557Explanation − The given number has 2 zeros which when replaced ... Read More
Dev Prakash Sharma
264 Views
Let us suppose we have given an array N size which consists of all the prime numbers. The task is to find the duplicates in the given array and remove them. For example, Input-1 −N = 8 arr[ ] = { 2 ,2 ,2 ,3 ,3 ,3 ,5 ,7 }Output ... Read More
Dev Prakash Sharma
699 Views
Given a C++ program as input, remove the comments from it. ‘source’ is a vector where the i-th line of the source code is the source[i]. This represents the result of splitting the source code string by the newline character . In C++, we can create two types of comments, ... Read More
Dev Prakash Sharma
131 Views
Catalan Numbers are sequences of natural numbers that gives the number of BST (Binary Search Tree) possible with n Values. So, the Catalan number is a full binary tree with n+1 leaves.Some applications of Catalan Numbers are counting the pairs of nested parentheses, valid mountain ranges etc.For n = 5, ... Read More
Dev Prakash Sharma
829 Views
Let’s suppose we have given an array of integers. The task is to find the index of a particular element in the given array. For example, Input-1 −N = 8 A[ ] = { 1, 2, 4, 3, 3, 1, 1, 5}Output −1Explanation − In the given array of integers, ... Read More
Dev Prakash Sharma
6K+ Views
A linked List is a linear data structure that has multiple nodes that are connected with each other. Each node consists of two fields Data Field and address of the next node.Let us assume we have given a singly linked list the task is to insert a node at the ... Read More
Dev Prakash Sharma
7K+ Views
Red Black Tree is a Self-Balanced Binary Search Tree in which each node of the tree is colored with either Red or Black. There are three types of operations we can perform on a Red Black Tree – Searching, Insertion and Deletion.Let us suppose we have to insert an element ... Read More
Dev Prakash Sharma
339 Views
Pandigital Number − In Mathematics, a Pandigital number is an integer that in a given base has among its significant digits each digit used in the base at least once.Pandigital numbers are the integers in which each digit is used as the base at least one time.For example, 1245678 is ... Read More
To Continue Learning Please Login
Login with Google