Ayush Gupta has Published 541 Articles

Convert all substrings of length ‘k’ from base ‘b’ to decimal in C++

Ayush Gupta

Ayush Gupta

Updated on 16-Jan-2020 06:45:26

66 Views

In this tutorial, we will be discussing a program to convert all substrings of length ‘k’ from base ‘b’ to decimal.For this we will be provided with a string of some certain length. Our task is to take the substrings from the given string of size ‘k’ and get it ... Read More

Convert all lowercase characters to uppercase whose ASCII value is co-prime with k in C++

Ayush Gupta

Ayush Gupta

Updated on 06-Jan-2020 12:24:57

84 Views

In this tutorial, we will be discussing a program to convert all lowercase characters to uppercase whose ASCII value is co-prime with k.For this we will be provided with a string and an integer value k. Our task is to traverse through the given string and change to uppercase all ... Read More

Convert a tree to forest of even nodes in C++

Ayush Gupta

Ayush Gupta

Updated on 06-Jan-2020 12:14:35

167 Views

In this tutorial, we will be discussing a program to convert a tree to a forest of even nodes.For this we will be provided with a binary tree of say N nodes. Our task is to calculate the maximum number of edges that can be removed to get forest of ... Read More

Convert a string to hexadecimal ASCII values in C++

Ayush Gupta

Ayush Gupta

Updated on 06-Jan-2020 12:10:54

2K+ Views

In this tutorial, we will be discussing a program to convert a string to hexadecimal ASCII values.For this we will be provided with a string of characters. Our task is to print that particular given string into its hexadecimal equivalent.Example Live Demo#include #include //converting string to hexadecimal void convert_hexa(char* ... Read More

Convert a String into a square matrix grid of characters in C++

Ayush Gupta

Ayush Gupta

Updated on 06-Jan-2020 12:06:36

256 Views

In this tutorial, we will be discussing a program to convert a string into a square matrix grid of characters.For this we will be provided with a string of characters. Our task is to print that particular string in the format of a matrix grid having a certain number of ... Read More

Convert a sentence into its equivalent mobile numeric keypad sequence in C++

Ayush Gupta

Ayush Gupta

Updated on 06-Jan-2020 12:02:35

607 Views

In this tutorial, we will be discussing a program to convert a sentence into its equivalent mobile numeric keypad sequence.For this we will be provided with a string of alphabetical characters. Our task is to print the numeric equivalent of the string i.e the numerical sequence of the keys to ... Read More

Convert a number of length N such that it contains any one digit at least 'K' times in C++

Ayush Gupta

Ayush Gupta

Updated on 06-Jan-2020 11:57:57

69 Views

In this tutorial, we will be discussing a program to convert a number of length N such that it contains any one digit at least ‘K’ times.For this we will be provided with a number of given length N. Our task is to convert the digits in the given number ... Read More

Convert a number m to n using minimum number of given operations in C++

Ayush Gupta

Ayush Gupta

Updated on 06-Jan-2020 11:44:39

597 Views

In this tutorial, we will be discussing a program to convert a number m to n using minimum number of given operations.For this we will be provided with two integers m and n. Our task is to convert the integer m to n using the given operations least times.Allowed operations ... Read More

Convert a number into negative base representation in C++

Ayush Gupta

Ayush Gupta

Updated on 06-Jan-2020 11:40:34

184 Views

In this tutorial, we will be discussing a program to convert a number into its negative base representation.For this we will be provided with a number and the corresponding negative base. Our task is to convert the given number into its negative base equivalent. We are allowing only values between ... Read More

Convert a normal BST to Balanced BST in C++

Ayush Gupta

Ayush Gupta

Updated on 06-Jan-2020 11:35:35

150 Views

In this tutorial, we will be discussing a program to convert a normal binary search tree to balanced binary search tree.For this we will be provided with a skewed binary search tree either left or right. Our task is to convert it into a balanced binary search tree following a ... Read More

Advertisements