0% found this document useful (0 votes)
69 views4 pages

String Intermediate PDF

The document lists 30 intermediate-level string problems including writing programs to check if strings are rotations of each other, remove duplicate characters from a string, find the longest palindrome in a string, and find the longest common subsequence between two strings. It also includes problems involving prefix, infix, and postfix notation, balanced parentheses, word wrapping, edit distance, and using the Boyer-Moore algorithm for pattern matching. Links are provided for each problem to help practice solutions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views4 pages

String Intermediate PDF

The document lists 30 intermediate-level string problems including writing programs to check if strings are rotations of each other, remove duplicate characters from a string, find the longest palindrome in a string, and find the longest common subsequence between two strings. It also includes problems involving prefix, infix, and postfix notation, balanced parentheses, word wrapping, edit distance, and using the Boyer-Moore algorithm for pattern matching. Links are provided for each problem to help practice solutions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

String

Intermediate Level Questions:



1. Write a Code to check whether one string is a rotation of another
[Practice here: https://www.geeksforgeeks.org/a-program-to-check-if-strings-are-
rotations-of-each-other/ ]

2. Write a program to remove Duplicate characters from the String.
[Follow here: https://www.geeksforgeeks.org/remove-duplicates-from-a-given-string/ ]

3. Write a Program to check whether a string is a valid shuffle of two
strings or not.
[Follow here: https://www.geeksforgeeks.org/check-whether-a-given-string-is-an-
interleaving-of-two-other-given-strings/ ]

4. Write a program to find the longest Palindrome in a string.[ Lonest
palindromic Substring]
[Practice here: https://practice.geeksforgeeks.org/problems/longest-palindrome-in-a-
string/0 ]

5. Find Longest Recurring Subsequence in String.
[Practice here: https://practice.geeksforgeeks.org/problems/longest-repeating-
subsequence/0 ]

6. Print all Subsequences of a string.
[Follow here: https://www.geeksforgeeks.org/print-subsequences-string/ ]

7. Print all the permutations of the given string
[Practice here: https://practice.geeksforgeeks.org/problems/permutations-of-a-given-
string/0 ]

8. Split the Binary string into two substring with equal 0’s and 1’s.
[Follow here: https://www.geeksforgeeks.org/split-the-binary-string-into-substrings-
with-equal-number-of-0s-and-1s/ ]

9. Rearrange characters in a string such that no two adjacent are same
[Practice here: https://practice.geeksforgeeks.org/problems/rearrange- characters/0 ]
10. Write a program to find the smallest window that contains all
characters of string itself.
[Practice here: https://practice.geeksforgeeks.org/problems/smallest-distant-window/0 ]

11. Number of Substrings with count of each character as “K”.



12. Find the longest common subsequence between two strings.
[Practice here: https://practice.geeksforgeeks.org/problems/longest-common-
subsequence/0]

13. Word Wrap Problem [VERY IMP].


[Practice here: https://practice.geeksforgeeks.org/problems/word-wrap/0]

14. Program to generate all possible valid IP addresses from given


string.
[Follow here: https://www.geeksforgeeks.org/program-generate-possible-valid-ip-
addresses-given-string/ ]

15. EDIT Distance [Very Imp]


[Practice here: https://practice.geeksforgeeks.org/problems/edit-distance/0 ]

16. Find next greater number with same set of digits. [Very Very IMP]
[Practice here: https://practice.geeksforgeeks.org/problems/next-permutation/0 ]

17. Try your hands on all these conversions:


è Prefix to Infix
è Prefix to Postfix
è Postfix to prefix
è Postfix to infix
[Follow link: https://www.geeksforgeeks.org/prefix-infix-conversion/ ]

18. Convert a Sentence into its equivalent mobile numeric keypad
sequence.
[Follow here: https://www.geeksforgeeks.org/convert-sentence-equivalent-mobile-
numeric-keypad-sequence/ ]

19. Balanced Parenthesis problem.[Imp]


[Practice here: https://practice.geeksforgeeks.org/problems/parenthesis-checker/0]

20. Minimum number of swaps for bracket balancing.


[Practice here: https://practice.geeksforgeeks.org/problems/minimum-swaps-for-
bracket-balancing/0]
21. Minimum number of bracket reversals needed to make an
expression balanced.
[Practice here: https://practice.geeksforgeeks.org/problems/count-the-reversals/0 ]

22. Word break Problem[ Very Imp]


[Practice here: https://practice.geeksforgeeks.org/problems/word-break/0 ]

23. Minimum rotations required to get the same string.
[Follow here: https://www.geeksforgeeks.org/minimum-rotations-required-get-
string/ ]

24. Find the first repeated word in string.
[Practice here: https://practice.geeksforgeeks.org/problems/second-most-
repeated-string-in-a-sequence/0 ]

25. Efficiently find first repeated character in a string without using
any additional data structure in one traversal
[Practice here : https://practice.geeksforgeeks.org/problems/find-first-repeated-
character/0 ]

26. Count All Palindromic Subsequence in a given String.

[Practice here: https://practice.geeksforgeeks.org/problems/count-palindromic-


subsequences/1 ]

27. Number of flips to make binary string alternate

[Practice here: https://practice.geeksforgeeks.org/problems/min-number-of-


flips/0 ]

28. Count of number of given string in 2D character array

[Follow here: https://www.geeksforgeeks.org/find-count-number-given-string-


present-2d-character-array/ ]


29. Search a Word in a 2D Grid of characters.

[Practice here: https://practice.geeksforgeeks.org/problems/find-the-string-in-


grid/0 ]

30. Boyer Moore Algorithm for Pattern Searching.

[Follow here: https://www.geeksforgeeks.org/boyer-moore-algorithm-for-pattern-


searching/]

You might also like