# Category Archives: Strings

Questions related to strings

## Print all possible strings that can be made by placing spaces

Given a string you need to print all possible strings that can be made by placing spaces (zero or one) in between them. Input: str[]… Read More »

## Manacher’s Algorithm – Linear Time Longest Palindromic Substring – Part 4

In Manacher’s Algorithm Part 1 and Part 2, we gone through some of the basics, understood LPS length array and how to calculate it efficiently… Read More »

## Longest Even Length Substring such that Sum of First and Second Half is same

Given a string ‘str’ of digits, find the length of the longest substring of ‘str’, such that the length of the substring is 2k digits… Read More »

## Manacher’s Algorithm – Linear Time Longest Palindromic Substring – Part 3

In Manacher’s Algorithm Part 1 and Part 2, we gone through some of the basics, understood LPS length array and how to calculate it efficiently… Read More »

## Manacher’s Algorithm – Linear Time Longest Palindromic Substring – Part 2

In Manacher’s Algorithm – Part 1, we gone through some of the basics and LPS length array. Here we will see how to calculate LPS… Read More »

## Manacher’s Algorithm – Linear Time Longest Palindromic Substring – Part 1

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

## LinkedIn Interview Experience | Set 3 (On-Campus)

LinkedIn Interview Experience (On Campus – Day 1) Online Round : 3 coding Questions in 1 hour : 1. We have to implement int getIntComplement(int… Read More »

## Check a given sentence for a given set of simple grammer rules

A simple sentence if syntactically correct if it fulfills given rules. The following are given rules. 1. Sentence must start with a Uppercase character (e.g.… Read More »

## MakeMyTrip Interview Experience | Set 3

I recently got selected in Make my trip. Here is my interview experience. Round 1-(Online MCQs) There were 2 sections – Aptitude and Logical Reasoning… Read More »

## MakeMyTrip Interview Experience | Set 2 (On-Campus)

MakeMyTrip recently visited our campus.Below is my interview experience: Round 1: (Online MCQs) Section A- There were 20 Aptitude and Logical Reasoning questions which has… Read More »

## Amazon Interview Experience | Set 144 (Off-Campus For SDE-1)

F2F Round 1: 1. Tell me about yourself. 2. Tell me about any challenging work you did in any of your past projects, why was… Read More »

## MakeMyTrip Interview Experience

MakeMyTrip recently visited our campus to hire full time employees. Here’s my interview experience: Round 1: (Online MCQs) Questions on aptitude, English, logical reasoning, C/C++… Read More »

## Given two strings, find if first string is a subsequence of second

Given two strings str1 and str2, find if str1 is a subsequence of str2. A subsequence is a sequence that can be derived from another… Read More »

## Remove comments from a given C/C++ program

Given a C/C++ program, remove comments from it. We strongly recommend to minimize your browser and try this yourself first. The idea is to maintain… Read More »