Given the head of a linked list, iteratively remove all consecutive subsequences of nodes whose sum is 0. Return the modified linked list after all such subsequences have been removed. You may return any valid result.
You are given a string s and an array of queries queries, where queries[i] = [lefti, righti, ki]. For each query, you can rearrange the substring s[lefti...righti] and replace up to ki characters in it with any lowercase English letters. Determine whether it is possible to form a palindrome from the resulting substring. Return an array of booleans answer where answer[i] is true if it is possible to form a palindrome for the i-th query, otherwise false.
Given an array of integers, determine the maximum sum of a non-empty contiguous subarray where you are allowed to optionally delete at most one element. The subarray must remain non-empty after any deletion.
Given a string containing lowercase English letters and balanced parentheses, reverse the substrings enclosed within each pair of parentheses, starting from the innermost ones. After processing, return the resulting string without any parentheses.
You are given a class FizzBuzz that has four methods: fizz(), buzz(), fizzbuzz(), and number(). These methods are executed by four different threads. The goal is to output a sequence of numbers from 1 to n with special rules: if the number is divisible by 3 and 5, print ‘fizzbuzz’; if divisible by 3 but not 5, print ‘fizz’; if divisible by 5 but not 3, print ‘buzz’; otherwise, print the number.
An ugly number is a positive integer that is divisible by at least one of the integers a, b, or c. Your task is to return the nth ugly number in the sequence formed by the integers divisible by a, b, or c.