Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Net Meeting
Tutorix
Categories
Java
JSP
iOS
HTML
Android
Python
C Programming
C++ Programming
C#
PHP
CSS
Javascript
jQuery
SAP
SAP HANA
Data Structure
RDBMS
MySQL
Mathematics
8085 Microprocessor
Operating System
Digital Electronics
Analysis of Algorithms
Mobile Development
Front End
Web Development
Selenium
MongoDB
Computer Network
General Topics
Library
Videos
Q/A
eBooks
Library
Videos
eBooks
Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
Android
Python
C Programming
C++
C#
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
Sudhir sharma
has Published
441
Answers
Print a case where the given sorting algorithm fails in C++
C++
Server Side Programming
Programming
sudhir sharma
Published on 27-Jan-2020 06:49:40
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
Print a closest string that does not contain adjacent duplicates in C++
C++
Server Side Programming
Programming
sudhir sharma
Published on 27-Jan-2020 06:45:00
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
Print a given matrix in counter-clockwise spiral form in C++
C++
Server Side Programming
Programming
sudhir sharma
Published on 27-Jan-2020 06:41:30
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
Print a given matrix in reverse spiral form in C++
C++
Server Side Programming
Programming
sudhir sharma
Published on 27-Jan-2020 06:37:49
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
Print a given matrix in zigzag form in C++
C++
Server Side Programming
Programming
sudhir sharma
Published on 27-Jan-2020 06:35:13
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
Print a matrix in a spiral form starting from a point in C++
C++
Server Side Programming
Programming
sudhir sharma
Published on 27-Jan-2020 06:33:03
In this problem, we are a 2d matrix and a point P(c, r). Our task is to print all elements of the matrix in a spiral form (anti-clockwise) that starts from a given point P.Let’s take an example to understand our problem, Input: matrix[][] = {{3, 5, 7} } Output:To ...
Read More
Print a matrix in alternate manner (left to right then right to left) in C++
C++
Server Side Programming
Programming
sudhir sharma
Published on 27-Jan-2020 06:30:20
In this problem, we are given a 2D array. Our task is to print all the elements of the array starting from the first row, from left to right, then right to left in the next row and again from left to right and so on.Let’s take an example to ...
Read More
Print a matrix in Reverse Wave Form in C++
C++
Server Side Programming
Programming
sudhir sharma
Published on 27-Jan-2020 06:28:04
In this problem, we are given a matrix. Our task is to print the matrix in reverse waveform in a single line.This example will make the problem clear, Input: 1 4 6 11 2 5 8 54 7 9 3 43 1 7 4 34 Output: ...
Read More
Print a number containing K digits with digital root D in C++
C++
Server Side Programming
Programming
sudhir sharma
Published on 27-Jan-2020 06:25:17
In this problem, we are given two numbers K and D. Our task is to print a number of k digits and which has digital root equal to D.Digital Root is a single-digit value which is the result of the recursive addition of the digits of the number till the ...
Read More
Print a number strictly less than a given number such that all its digits are distinct in C++
C++
Server Side Programming
Programming
sudhir sharma
Published on 27-Jan-2020 06:22:56
In this problem, we are given a number n. Our task is to print the largest number less than n such that all its digits are distinct.Let’s take an example to understand the problemInput: n = 2332 Output: 2319To solve this problem, we reverse the count of the numbers i.e. ...
Read More
1
2
3
4
5
6
7
...
45
Next
Advertisements