- 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
511 Views
In this problem, we are given a string password. Our task is to print * in place of characters of the password.Let’s take an example to understand the problem, Input: password Output ********To solve this problem, we will traverse the password we have entered and print * in place of ... Read More
sudhir sharma
341 Views
In this problem, we are given two numbers n and k. Our task is to print the kth least significant bit of the number n.Let’s take an example to understand the problemInput: n = 12 , k = 3 Output 1 Explanation: Let’s see the binary representation of n: 12 ... Read More
sudhir sharma
342 Views
Here, we have to print 1 2 3 sequences repeatedly infinite number of times using threads in the c programming language.Let’s see the sample output that we want from our code, 1 2 3 1 2 3 1 2 3 1 2 3For this, we will have to use three ... Read More
sudhir sharma
129 Views
In this problem, we are given 2 arrays x[] , y[] such that (x, y) gives a cordinate of a point in 2D plane. Our task is to print all points along with their frequencies of occurence.Let’s take an example to understand the problemInput: x[]={0, 1, 1, 0, 0} ; ... Read More
sudhir sharma
198 Views
Here, we will see the code that will print a 2D matrix in c/c++ programming language without using curly braces.Curly braces are separators in a programming language that are used to define separate code blocks in the program. Without curly braces defining scopes is difficult in c/c++.Let’s see the basic ... Read More
sudhir sharma
50 Views
In this problem, we are given a sorting algorithm and a number n. Our task is to print an array of n elements that could not be sorted by the algorithm. i.e the algorithm will fail.Algorithmloop i from 1 to n-1 loop j from i to n-1 if ... Read More
sudhir sharma
104 Views
In this problem, we are given a string. Our task is to print a string that is closest to the current string and does not contain any adjacent duplicate characters.Let’s take an example to understand the problemInput: string = “good” Output: goadIn this example, we found that the elements at ... Read More
sudhir sharma
654 Views
In this problem, we are given a 2-dimensional matrix. And our task is to print the elements of the matrix in a counter-clockwise spiral from.Counterclockwise Spiral Form − It is a spiral traversal which starts from top-left and the goes in the counter-clockwise direction to first bottom-right-up-left.The counter-clockwise traversal will ... Read More
sudhir sharma
346 Views
In this problem, we are given a 2-dimensional matrix. Our task is to print all the elements of the matrix in reverse spiral form.Let’s take an example to understand the problemInput: 12 23 54 67 76 90 01 51 43 18 49 5 31 91 75 ... Read More
sudhir sharma
541 Views
In this problem, we are given a 2-dimensional matrix. Our task is to print the zigzag form of the matrix.Let’s take an example to understand the problemInput: 12 99 43 10 82 50 15 75 5 Output: 12 99 43 50 82 10 15 75 5To solve ... Read More