life is too short for a diary



Posts Tagged: string

Apply Discount To Prices leetcode solution

A sentence is a string of single-space separated words where each word can contain digits, lowercase letters, and the dollar sign '$'. A word represents a price if it is a sequence of digits preceded by a dollar sign...

Continue reading → leetcode java python string



Leetcode - Longest Substring Without Repeating Characters

In this [leetcode](https://leetcode.com/problems/longest-substring-without-repeating-characters/) problem, we are asked to find the length of the longest string of characters in a provided string that does not contain repeating characters. In other words, in the string `abcabcbb` the longest substring without repeating characters is `abc` (with a length of 3)...

Continue reading → leetcode two pointers set string