Questions related to strings

## Find indices of all occurrence of one string in other

Given two strings, str1 and str2, the task is to print the indices(Consider, indices starting from 0) of occurrence of str2 in str1. If no… Read More »

## Check if two strings are permutation of each other

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

## Remove all occurrences of a character in a string

Given a string. Write a program to remove all the occurrences of a character in the string. Examples: Input : s = “geeksforgeeks” c =… Read More »

## Find alphabetical order such that words can be considered sorted

Given an array of words, find any alphabetical order in the English alphabet such that the given words can be considered sorted (increasing), if there… Read More »

## Maximum power of jump required to reach the end of string

Given a string consisting of 1 and 0, the task is to find out the maximum power of jump required to reach the end of… Read More »

## Zookr.in Interview Experience

Zookr.in Interview Process was very good and intellectual. These guys focussed on both logic and programming skills. Seriously, I was a bit hesitant since this… Read More »

## Alternatively Merge two Strings in Java

Given 2 strings, merge them in an alternate way, i.e. the final string’s first character is the first character of the first string, the second… Read More »

## Longest substring with count of 1s more than 0s

Given a binary string find the longest substring which contains 1’s more than 0’s. Examples: Input : 1010 Output : 3 Substring 101 has 1… Read More »

## Lexicographically middle string

Given two strings a and b. Our task is to print any string which is greater than a(lexicographically) but smaller than b(lexicographically). If it is… Read More »

## Count substrings that starts with character X and ends with character Y

Given a string str of n lowercase characters, the task is to count the number of substrings of str starting with character X and ending… Read More »

## Average of ASCII values of characters of a given string

Given a string, the task is to find the average of ASCII values of characters in the string. Examples: Input: str = “for” Output: 109… Read More »

## Java: String is Immutable. What exactly is the meaning?

Before proceeding further with the fuss of immutability, let’s just take a look into the String class and its functionality a little before coming to… Read More »

## Goldman Sachs Internship Interview Experience (On-Campus)

Interview Experience- Goldman Sachs Hi, I am Ashish Gupta, student of Mathematics and Computing branch, Delhi Technological University. I recently gave interview for Goldman Sachs… Read More »

## Count of strings that can be formed from another string using each character at-most once

Given two strings str1 and str2, the task is to print the number of times str2 can be formed using characters of str1. However, a… Read More »

## String transformation using XOR and OR

Given two binary strings. The task is to check if string s1 can be converted to string s2 by performing the given operations any number… Read More »