String Problems
Anonymous User
5484

String

Heap

  1. https://leetcode.com/problems/reorganize-string/ - can solve with HashMap
  2. https://leetcode.com/problems/rearrange-string-k-distance-apart/
  3. https://leetcode.com/problems/sort-characters-by-frequency/ - also by map

Sliding wd

Most of the following Questions can also be solved using Map

  1. https://leetcode.com/problems/longest-substring-without-repeating-characters/
  2. https://leetcode.com/problems/permutation-in-string/
  3. https://leetcode.com/problems/find-all-anagrams-in-a-string/
  4. https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/
  5. https://leetcode.com/problems/longest-substring-with-at-most-two-distinct-characters/
  6. https://leetcode.com/problems/find-k-length-substrings-with-no-repeated-characters/
  7. https://leetcode.com/problems/maximum-number-of-vowels-in-a-substring-of-given-length/

https://leetcode.com/problems/reverse-words-in-a-string-ii/

stack

Type - paranthasis questions
, MonoTonic Stk

  1. https://leetcode.com/problems/valid-parentheses/
  2. https://leetcode.com/problems/minimum-remove-to-make-valid-parentheses/
  3. https://leetcode.com/problems/simplify-path/
  4. https://leetcode.com/problems/decode-string/
  5. https://leetcode.com/problems/minimum-add-to-make-parentheses-valid/
  6. https://leetcode.com/problems/score-of-parentheses/
  7. https://leetcode.com/problems/remove-k-digits/
  8. https://leetcode.com/problems/backspace-string-compare/
  9. https://leetcode.com/problems/maximum-nesting-depth-of-the-parentheses/

https://leetcode.com/problems/number-of-substrings-containing-all-three-characters/
https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii/
https://leetcode.com/problems/remove-duplicate-letters/

Two Pointers

  1. https://leetcode.com/problems/valid-palindrome-ii/
  2. https://leetcode.com/problems/reverse-string/
  3. https://leetcode.com/problems/reverse-words-in-a-string-iii/

https://leetcode.com/problems/shortest-word-distance-ii/
https://leetcode.com/problems/reverse-words-in-a-string/
https://leetcode.com/problems/compare-version-numbers/
https://leetcode.com/problems/one-edit-distance/
https://leetcode.com/problems/shortest-distance-to-a-character/
https://leetcode.com/problems/find-first-palindromic-string-in-the-array/
https://leetcode.com/problems/merge-strings-alternately/
https://leetcode.com/problems/di-string-match/

Hash Map

  1. https://leetcode.com/problems/design-underground-system/
  2. https://leetcode.com/problems/group-anagrams/
  3. https://leetcode.com/problems/valid-anagram/
  4. https://leetcode.com/problems/find-and-replace-pattern/
  5. https://leetcode.com/problems/first-unique-character-in-a-string/
  6. https://leetcode.com/problems/custom-sort-string/
  7. https://leetcode.com/problems/group-shifted-strings/
  8. https://leetcode.com/problems/reorganize-string/
  9. https://leetcode.com/problems/verifying-an-alien-dictionary/
  10. https://leetcode.com/problems/ransom-note/
  11. https://leetcode.com/problems/isomorphic-strings/
  12. https://leetcode.com/problems/minimum-number-of-steps-to-make-two-strings-anagram/
  13. https://leetcode.com/problems/sort-characters-by-frequency/
  14. https://leetcode.com/problems/word-pattern/
  15. https://leetcode.com/problems/substrings-that-begin-and-end-with-the-same-letter/
  16. https://leetcode.com/problems/jewels-and-stones/
  17. https://leetcode.com/problems/longest-palindrome/
  18. https://leetcode.com/problems/check-if-the-sentence-is-pangram/
  19. https://leetcode.com/problems/check-if-one-string-swap-can-make-strings-equal/
  20. https://leetcode.com/problems/evaluate-the-bracket-pairs-of-a-string/
  21. https://leetcode.com/problems/count-the-number-of-consistent-strings/
  22. https://leetcode.com/problems/replace-words/
  23. https://leetcode.com/problems/determine-if-two-strings-are-close/
  24. https://leetcode.com/problems/rings-and-rods/
  25. https://leetcode.com/problems/map-sum-pairs/

https://leetcode.com/problems/integer-to-roman/

given 1 Vector of string

  1. https://leetcode.com/problems/longest-string-chain/

Given 1 string + 1 vector< string >

Given 2 strings

  1. https://leetcode.com/problems/implement-strstr/

paranthasis questions

Others :

  1. https://leetcode.com/problems/longest-common-prefix/
  2. https://leetcode.com/problems/robot-bounded-in-circle/
  3. https://leetcode.com/problems/largest-number/
  4. https://leetcode.com/problems/count-and-say/
  5. https://leetcode.com/problems/add-strings/
  6. https://leetcode.com/problems/smallest-string-with-a-given-numeric-value/
  7. https://leetcode.com/problems/shortest-word-distance/
  8. https://leetcode.com/problems/excel-sheet-column-number/
  9. https://leetcode.com/problems/multiply-strings/
  10. https://leetcode.com/problems/string-to-integer-atoi/
  11. https://leetcode.com/problems/partitioning-into-minimum-number-of-deci-binary-numbers/
  12. https://leetcode.com/problems/strobogrammatic-number-ii/
  13. https://leetcode.com/problems/shortest-palindrome/
  14. https://leetcode.com/problems/minimum-number-of-operations-to-move-all-balls-to-each-box/
  15. https://leetcode.com/problems/number-of-pairs-of-strings-with-concatenation-equal-to-target/
  16. https://leetcode.com/problems/length-of-last-word/
  17. https://leetcode.com/problems/robot-return-to-origin/
  18. https://leetcode.com/problems/check-if-all-as-appears-before-all-bs/
  19. https://leetcode.com/problems/shortest-word-distance-iii/
  20. https://leetcode.com/problems/sorting-the-sentence/
Comments (0)