1115. Print FooBar Alternately
1115. Print FooBar Alternately
Description
Implement a thread-safe bounded blocking queue that has the following methods:
1115. Print FooBar Alternately
Implement a thread-safe bounded blocking queue that has the following methods:
340. Longest Substring with At Most K Distinct Characters
Given a string s
and an integer k
, return the length of the longest of s
that contains at most k
distinct characters.
1209. Remove All Adjacent Duplicates in String II
You are given a string s
and an integer k
, a k
duplicate removal consists of choosing k
adjacent and equal letters from s
and removing them, causing the left and the right side of the deleted substring to concatenate together.
1352. Product of the Last K Numbers
Design an algorithm that accepts a stream of integers and retrieves the product of the last k
integers of the stream.