
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
Sunidhi Bansal has Published 1085 Articles

Sunidhi Bansal
504 Views
Given with an array of int elements, the task is to arrange the elements in descending order and finding their occurrences.Input : arr[]={1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 6, 7, 7} Output : 7 occurs: 2 6 occurs: 1 5 occurs: 1 4 ... Read More

Sunidhi Bansal
411 Views
Given a 2d array of n*n and the task is to find the antispiral arrangement of the given matrixInput : arr[4][4]={1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 13, 14, 15, 16} Output: 10 11 7 6 5 9 13 14 15 16 ... Read More

Sunidhi Bansal
446 Views
Given a 2d array of n*n and the task is to find the antispiral arrangement of the given matrixInput : arr[4][4]={1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 13, 14, 15, 16} Output : 1 6 11 16 4 7 10 13AlgorithmSTART Step ... Read More

Sunidhi Bansal
715 Views
Here, the task is to print those number in an array having 1, 2 and 3 as digits in their numbers and if their is no such number than the output must be -1Input : arr[] = {320, 123, 124, 125, 14532, 126, 340, 123400, 100032, 13, 32, 3123, 1100} ... Read More

Sunidhi Bansal
639 Views
Given with an array of elements and the task is to print those numbers whose digit sum is also prime and return -1 is not such digit exists in an arrayInput: arr[]={2, 4, 3, 19, 25, 6, 11, 12, 18, 7} Output : 2, 3, 25, 11, 12, 7Here, the ... Read More

Sunidhi Bansal
242 Views
The task is to print the given n number which have exactly two set bits that neither less than 2 nor more than 2.Set bits in computer language are the one that have value 1 and unset bits have value as 0Input: value of num=5 Output: 1 3 5 ... Read More

Sunidhi Bansal
1K+ Views
Given with inorder and preorder of a tree program must find the postroder traversal and print the sameInput: Inorder traversal in[] = {4, 2, 5, 1, 3, 6} Preorder traversal pre[] = {1, 2, 4, 5, 3, 6} Output: Postorder traversal post[] = {4, 5, 2, 6, 3, 1}AlgorithmSTART Step ... Read More

Sunidhi Bansal
1K+ Views
Given with a linked list program must print the list starting from the end till the front using the stack data structureInput : 10 -> 5 -> 3 -> 1 -> 7 -> 9 Output: 9 -> 7 -> 1 -> 3 -> 5 -> 10Here the user can use ... Read More

Sunidhi Bansal
367 Views
As per the question, the task is to find the nearest prime number by adding the prime number starting from 2 if the number N is not Prime.Input: N=6 Output: 11ExplanationSince 6 is not prime add first prime to 6 i.e. 2 which will result to 8 now 8 is ... Read More

Sunidhi Bansal
211 Views
GCDGCD stands for Greatest Common Divisor of two or more integers excluding 0Like, to find the greatest common divisor of 48 and 18048 = 2 × 2 × 2 × 2 × 3180 = 2 × 2 × 3 × 3 × 5Greatest common divisor = 2 × 2 × ... Read More