Strings and tries interview questions
Matching, palindromes, prefixes and transformations.
5 questions solved with this pattern, most asked first. Reported by candidates in public interview write-ups and reworded by Scrivio. How the reports are counted
Your progress: 0 of 5 done, 0 saved
Find the longest substring of a string that reads the same forwards and backwards.
Reported 69 times
Read the solutionDynamic programmingExample sources
3 of the write-ups counted: geeksforgeeks.org 2020, geeksforgeeks.org 2016, geeksforgeeks.org 2020
Write a program that outputs a string's characters in reverse order.
Reported 45 times
Read the solutionArrays and stringsExample sources
3 of the write-ups counted: geeksforgeeks.org 2024, geeksforgeeks.org 2024, geeksforgeeks.org 2024
Reverse the order of the words in a sentence.
Reported 45 times
Read the solutionArrays and stringsExample sources
3 of the write-ups counted: geeksforgeeks.org 2021, geeksforgeeks.org 2020, geeksforgeeks.org 2017
Determine whether a given string reads the same forward and backward.
Reported 31 times
Read the solutionArrays and stringsExample sources
3 of the write-ups counted: geeksforgeeks.org 2023, geeksforgeeks.org 2021, geeksforgeeks.org 2016
How many substrings of a given string are palindromes? Count them.
Reported 18 times
Read the solutionArrays and stringsExample sources
3 of the write-ups counted: geeksforgeeks.org 2024, geeksforgeeks.org 2024, geeksforgeeks.org 2022