Sunidhi Bansal has Published 1101 Articles

Recursive function to check if a string is palindrome in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2021 08:09:17

4K+ Views

We are given a string Str as input. The goal is to find if the input string is a palindrome word or not using a recursive function. Palindrome strings are those strings that when read from front or end form the same word. The strings of length 0 are considered ... Read More

C Program for Recursive Bubble Sort

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2021 07:58:22

5K+ Views

Bubble Sort is one of the simplest sorting algorithms used to sort data by comparing the adjacent elements. All the elements are compared in phases. The first phase places the largest value at the end, the second phase places the second largest element at the second last position and so ... Read More

Rearrange the given source code in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2021 07:37:58

205 Views

We are given a string type variable, let's say, str which will be used to store the source code then calculate the size of the string and pass it to the function. The task is to rearrange the given source code and then print the result.Let us see various input ... Read More

Rearrange the string to maximize the number of palindromic substrings in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2021 07:15:32

158 Views

We are given with a string ‘str’ of any given length. The task is to rearrange the characters in such a manner that there will be maximum substrings that will be a palindrome string without adding or removing a character from the given input string. Palindrome string is the one ... Read More

Rearrangement of a number which is also divisible by it in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2021 07:13:10

221 Views

We are given an integer type number, let's say, number. The task is to rearrange number digit’s in such a manner that a number formed after rearrangement is also divisible by the given number i.e. ’number’.Let us see various input output scenarios for this −Input − int number = 100035Output − Rearrangement ... Read More

Rearrange characters to form palindrome if possible in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2021 07:09:53

651 Views

We are given with a string ‘str’ of any given length. The task is to rearrange the characters in such a manner that the output will be a palindrome string without adding or removing a character from the given input string. Palindrome string is the one in which the characters ... Read More

Rearrange Odd and Even values in Alternate Fashion in Ascending Order in C+=+

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2021 07:06:34

1K+ Views

We are given an integer type array containing both positive and negative numbers, let's say, arr[] of any given size. The task is to rearrange an array in such a manner that when the lowest element in an array is odd then elements of an array will be rearranged in ... Read More

Rearrange first N numbers to make them at K distance in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2021 06:57:56

50 Views

We are given integer variables, let's say, N and K. The task is to firstly calculate the permutation of N and then rearrange the permutation in such a manner that it will be K distance from every element.Let us see various input output scenarios for this −Input − int n = ... Read More

Rearrange positive and negative numbers with constant extra space in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2021 06:54:58

168 Views

We are given an integer type array containing both positive and negative numbers, let's say, arr[] of any given size. The task is to rearrange an array in such a manner that all the elements of an array are sorted using the inbuilt sort function of C++ STL as well ... Read More

Rearrange positive and negative numbers using inbuilt sort function in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Nov-2021 06:51:10

809 Views

We are given an integer type array containing both positive and negative numbers, let's say, arr[] of any given size. The task is to rearrange an array in such a manner that all the elements of an array are sorted using the inbuilt sort function of C++ STL as well ... Read More

Previous 1 ... 4 5 6 7 8 ... 111 Next
Advertisements