
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 548 Articles

Dev Prakash Sharma
2K+ Views
In the given problem, we have to update the bit of the given index of a number. To update the number, we can use Bit Manipulation operation on a given number. For example, Input-1 −N= 25 bit= 1 position= 2Output −29Explanation − Since the given input 25 can be written ... Read More

Dev Prakash Sharma
401 Views
static_assert is a function which is useful for programmers to print the error in the screen after compiling the program without messing up with the output too much.Earlier in C++11 and C++14, static_assert had different functionality which means we have to write our own message while defining the static_assert. However, ... Read More

Dev Prakash Sharma
2K+ Views
In the given array of sorted integers, the task is to print the squares of every array element and print the array in sorted order. For example, Input-1 −arr[ ] = { -3, -1, 0, 1, 4, 6 };Output −{0, 1, 1, 9, 16, 36}Explanation − The squares of each ... Read More

Dev Prakash Sharma
387 Views
Given an array of 0, 1 and 2 sort the element in an order such that all the zeros come first before 1 and all the 2’s in the end. We have to sort all the elements of the array in-place.We can solve this problem using DNF (Dutch National Flag) ... Read More

Dev Prakash Sharma
944 Views
Given an array of 0, 1, and 2, sort the elements in an order such that all the zeros come first before 1 and all the 2’s in the end. We have to sort all the elements of the array in-place.We can solve this problem using DNF (Dutch National Flag) ... Read More

Dev Prakash Sharma
4K+ Views
Lambda Function − Lambda are functions is an inline function that doesn’t require any implementation outside the scope of the main program.Lambda Functions can also be used as a value by the variable to store. Lambda can be referred to as an object that can be called by the function ... Read More

Dev Prakash Sharma
564 Views
Given a singly linked list, the task is to search a particular element in the linked list. If the element is found, then print “present” otherwise “Not present”. For example, Input-1 −1→ 2→ 3→ 4→ 5→ 6Searching for ‘7’Output −Not PresentExplanation − In the given singly linked list the element ... Read More

Dev Prakash Sharma
2K+ 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
2K+ 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
1K+ 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