## Write your own strcmp that ignores cases

Write a modified strcmp function which ignores cases and returns -1 if s1 < s2, 0 if s1 = s2, else returns 1. For example,… Read More »

- Repeated Character Whose First Appearance is Leftmost
- Convert character array to string in C++
- Count substrings that contain all vowels | SET 2
- Find the longest string that can be made up of other strings from the array
- Minimum number of times A has to be repeated such that B is a substring of it
- Count of integers of length N and value less than K such that they contain digits only from the given set
- Java program to check whether a string is a Palindrome
- Minimum number of adjacent swaps to convert a string into its given anagram
- Check for balanced parentheses in an expression | O(1) space | O(N^2) time complexity
- Rearrange characters in a string such that no two adjacent are same using hashing
- Check whether two strings contain same characters in same order
- Generate all permutations of a string that follow given constraints
- Distinct palindromic sub-strings of the given string using Dynamic Programming
- Program to generate all possible valid IP addresses from given string | Set 2
- Implement a Dictionary using Trie
- Maximize the happiness of the groups on the Trip
- Largest substring with same Characters
- InfyTQ 2019 : Find the position from where the parenthesis is not balanced
- Check if a string can be obtained by rotating another string d places
- Minimum rotations required to get the same String | Set-2
- C++ program to compare two Strings using Operator Overloading
- Count of substrings which contains a given character K times
- Append a digit in the end to make the number equal to the length of the remaining string
- Minimum number of sub-strings of a string such that all are power of 5
- Reverse individual words with O(1) extra space
- Find uncommon characters of the two strings | Set 2
- Persistent Trie | Set 1 (Introduction)
- Total number of odd length palindrome sub-sequence around each centre
- Optimally accommodate 0s and 1s from a Binary String into K buckets
- Minimum cost to modify a string

Write a modified strcmp function which ignores cases and returns -1 if s1 < s2, 0 if s1 = s2, else returns 1. For example,… Read More »

Write a program to Validate an IPv4 Address. According to Wikipedia, IPv4 addresses are canonically represented in dot-decimal notation, which consists of four decimal numbers,… Read More »

I am a final year student of IIT Guwahati and the first phase of placements has just finished at our college. I was recruited by… Read More »

Given an array of words, print all anagrams together. For example, if the given array is {“cat”, “dog”, “tac”, “god”, “act”}, then output may be… Read More »

Given a string, find the longest substring which is palindrome. For example, if the given string is “forgeeksskeegfor”, the output should be “geeksskeeg”. Recommended: Please… Read More »

Given a string, move all even positioned elements to end of string. While moving elements, keep the relative order of all even positioned and odd… Read More »

Given a string, print all permutations of it in sorted order. For example, if the input string is “ABC”, then output should be “ABC, ACB,… Read More »

Given a string, find its rank among all its permutations sorted lexicographically. For example, rank of “abc” is 1, rank of “acb” is 2, and… Read More »

Given a number, find the next smallest palindrome larger than this number. For example, if the input number is “2 3 5 4 5”, the… Read More »

Given a string, a partitioning of the string is a palindrome partitioning if every substring of the partition is a palindrome. For example, “aba|b|bbabb|a|b|aba” is… Read More »

Pattern searching is an important problem in computer science. When we do search for a string in notepad/word file or browser or database, pattern searching… Read More »

Given a sequence, find the length of the longest palindromic subsequence in it. As another example, if the given sequence is “BBABCBCAB”, then the output… Read More »

Write a function to check whether two given strings are anagram of each other or not. An anagram of a string is another string that… Read More »