adaptatron's blog

By adaptatron, 6 hours ago, In English

I created a video that talks about 6 problems involving RBS.

  • Level 0 : Check if string is RBS
  • Level 1 : Length of longest RBS
  • Level 2 : Count of RBS substrings
  • Level 3 : Is a substring S[L...R] RBS?
  • Level 4 : Flip each element in S[L...R]. Is the original string RBS?
  • Level 5 : How many (L, R) can be flipped such that original string is still RBS?

I discuss some approaches using DP, Stack, Contribution Technique, Binary Search, Segment Tree, Binary Search inside segment tree, fast lookup of zero sum subarrays, etc.

Practice Problems :

  • Vote: I like it
  • +1
  • Vote: I do not like it