Skip to content
the poor coder

Home / Topics / #string

#string

40 posts
2021

Leetcode - Camelcase Matching Solution

A query word matches a given pattern if we can insert lowercase letters to the pattern word so that it equals the query. (We may insert each character at any position, and may insert 0 characters.) Given a list of…

2021

Leetcode - Make The String Great Solution

Given a string s of lower and upper case English letters. A good string is a string which doesn't have two adjacent characters s[i] and s[i + 1] where: 0 <= i <= s.length - 2 s[i] is a lower-case letter and s[i + 1] is…

2021

Leetcode - Reformat Date Solution

Given a date string in the form Day Month Year, where: Day is in the set {"1st", "2nd", "3rd", "4th", ..., "30th", "31st"}. Month is in the set {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct"…

leetcodestring1 min read
2021

Leetcode - Reformat The String Solution

Given alphanumeric string s. (Alphanumeric string is a string consisting of lowercase English letters and digits). You have to find a permutation of the string where no letter is followed by another letter and no digit…

leetcodestring2 min read
2021

Leetcode - Defanging an IP Address Solution

Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address replaces every period "." with "[.]". Example 1: Example 2: Constraints: The given address is a valid IPv4 address…

leetcodestring1 min read
2021

Leetcode - Reverse Only Letters Solution

Given a string S, return the "reversed" string where all characters that are not a letter stay in the same place, and all letters reverse their positions. Example 1: Example 2: Example 3: Note: S.length <= 100 33 <=…

leetcodestring1 min read
ESC