- 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
Sunidhi Bansal has Published 1100 Articles
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
595 Views
Given a string str1 as input. The goal is to insert a ‘*’ between a pair of identical characters in the input string and return the resultant string using a recursive approach.If the input string is str1= "wellness" then output will be "wel*lnes*s"ExamplesInput − str1="happiness"Output − String after adding * : hap*pines*sExplanation − ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
401 Views
Given a Singly linked list and positive integer N as input. The goal is to find the Nth node from the end in the given list using recursion. If the input list has nodes a → b → c → d → e → f and N is 4 then ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
275 Views
Given a Singly linked list as input. The goal is to split the list into two singly linked lists that have alternate nodes of the original list. If the input list has nodes a → b → c → d → e → f then after the split, two sub-lists ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
1K+ Views
We are given with integer values that will be used to form a linked list. The task is to firstly insert and then traverse a singly linked list using a recursive approach.Recursive addition of nodes at the endIf head is NULL → add node to headElse add to head( head ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
1K+ Views
Given an integer array Arr[] containing integer numbers in any order. The goal is to find the input integer val present in the array using recursive search on the array.If val is not found in the input array Arr[] then return -1. Print the index of val if found in ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
174 Views
Given a 2D square matrix as input. The goal is to find the elements that are common in both its primary and secondary diagonals. If the input matrix is1 2 3 2 2 4 1 4 7Then its primary diagonal is 1 2 7 and the secondary diagonal is 3 ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
4K+ Views
A matrix can be traversed in two ways. Row-mise traversal visits each row one by one starting from first row then second and so on till the last row. Elements in the row are returned from index 0 to the last index.In Column-wise traversal, elements are traversed from the first ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
897 Views
Given an integer Number as input. The goal is to find the minimum number of steps or operations required to reduce the input Number to 1. Operations that can be performed will be-:If Number is even, then Divide it by 2.If Number is odd, then increment or decrement it by ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
5K+ Views
Given two integers Num1 and Num2 as input. The integers can be represented as fraction Num1/Num2. The goal is to reduce this fraction to its lowest form.Using GCD to find highest denominatorWe will calculate the greatest common divisor of both numbers.Divide both numbers by that gcdSet both variables as quotient ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
144 Views
Given an integer variable Number as input. Let us consider an array containing elements in the range 1 to Number in any order. If we perform an operation Number-1 times on an array such thatWe select two elements A and B from the arrayRemove A and B from arrayAdd sum ... Read More