DSA - String

template

1
2
3
class Solution:
  def solution(self, s, n):
    pass

Leetcode Problems

  • Longest substring without repeating characters
  • longest palindromic substring
  • zigzag conversion
  • string to integer
  • Integer to roman
  • roman to integer
  • letter combinations of a phone number
  • valid parentheses
  • generate parentheses
  • implement strStr()
  • substring with concatenation of all words
  • longest valid parentheses
  • multiply strings
  • group anagrams
  • add binary
  • simplify path
  • minimum window substring
  • decode ways
  • restore IP addresses
  • interleaing String
  • distinct subsequences
  • valid palindrome
  • word ladder II
  • reverse words in a string
  • basic calculator II
  • reverse string
  • reverse vowels of a string
  • mini parser
  • first unique chracter in a string
  • complex number multiplication
  • reverse string II
  • reverse words in a string III
  • delete operation for two strings
  • find duplicate file in system
  • smallest range convering elements from k lists
  • palindromic substrings
  • count binary substrings
  • to lower case
  • reorganize string
  • ambiguous coordinates
  • most common word
  • split array into fibonacci sequence
  • score of parentheses
  • find and replace pattern
  • word subsets
  • long pressed name
  • vowel spellchecker
  • check if word is valid after substitutions
  • defanging an IP address
  • compare strings by frequency of the smallest character
  • maximum number of balloons
  • split a string in balanced strings
  • replace the substring for balanced strings
  • minimum remove to make valid parentheses
  • search suggestions system
  • remove palindromic subsequences
  • check if a word occurs as a prefix of any word in a sentence
  • check f a string contains all binary codes of size k
  • number of ways to split a string
  • maximum nesting depth of the parentheses
  • largest substring between two equal characters
  • minimum deletions to make string balanced
  • check if two string arrays are equivalent
  • maximum repeating substring
  • goal parser interpretation
  • count the number of consistent strings
  • reformat phone number
  • determine if string halves are alike
  • latest time by replacing hidden digits

Solutions

ZigZag Conversion

1
2
3
class Solution:
  def solution(self, s, n):
    pass
Licensed under CC BY-NC-SA 4.0
Get Things Done
Built with Hugo
Theme Stack designed by Jimmy