- 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
Dev Prakash Sharma has Published 556 Articles
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
Dev Prakash Sharma
2K+ Views
Given a string ‘s’, the task is to find the first unique character which is not repeating in the given string of characters and return its index as output. If there are no such characters present in the given string, we will return ‘-1’ as output. For example, Input-1 −s ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
Dev Prakash Sharma
450 Views
Let's suppose we have a string ‘str’ which consists of some character in it. The task is to check whether the given string has all its characters capitalized or not and return True or False respectively. For example, Input-1 −str = “INDIA”Output −TrueExplanation − Since all the character of the ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
Dev Prakash Sharma
2K+ Views
A Linked List is a linear Data Structure that contains nodes and each node has two fields; one is the value or data to be inserted and the other field stores the address of the next node.Our task here is to delete a node from the end of a Linked ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
Dev Prakash Sharma
354 Views
Let’s suppose we have given a length of string ‘str’ and a string. The task is to count the number of substrings that starts with ‘1’ and ends with ‘1’ in a given Binary String. A Binary String contains ‘1’ and ‘0’ only. For example, Input-1 −N = 5 str ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
Dev Prakash Sharma
7K+ Views
Let's suppose we have given a number N. the task is to find the total number of digits present in the number. For example, Input-1 −N = 891452Output −6Explanation − Since the given number 891452 contains 6 digits, we will return ‘6’ in this case.Input-2 −N = 0074515Output −5Explanation − Since ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
Dev Prakash Sharma
254 Views
A good meal contains exactly two different food items with a sum of deliciousness equal to a power of two. You can pick any two different foods to make a good meal.Let us suppose we have given an array of integers arr where arr[i] is the deliciousness of the ith ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
Dev Prakash Sharma
20K+ Views
Given two strings ‘a’ and string ‘b’, we have to check if they are anagrams of each other or not and return True/False. For example, Input-1 −String a= “india” String b= “nidia”Output −TrueExplanation − Since the given string ‘b’ contains all the characters in the string ‘a’ thus we will ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
Dev Prakash Sharma
819 Views
Suppose we’ve two strings ‘a’ and ‘b’, the task is to find whether we can obtain string ‘b’ by rotating string ‘a’ exactly by 2 places in an anticlockwise or clockwise direction. For example, Input-1 −a = google b = legoogOutput −TrueExplanation − String ‘google’ can be rotated in an ... Read More
Write a program in C++ to check if a string can be obtained by rotating another string by two places
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
Dev Prakash Sharma
403 Views
Suppose we’ve given two strings ‘a’ and ‘b’, the task is to find whether we can obtain the string ‘b’ by rotating string ‘a’ exactly by two places in an anticlockwise or clockwise direction. For example, Input-1 −a = google b = legoogOutput −TrueExplanation − String ‘google’ can be rotated ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
Dev Prakash Sharma
8K+ Views
A linked list is a linear data structure that has multiple nodes that are connected with each other. Each node consists of two fields – Data Field and the address of the next node.Let us assume we have a singly linked list and we need to delete the first node ... Read More