Showing 3 of 126 questions
Given a string 't', and a target string 's', find the maximum number of times 's' appears as a subsequence of 't' after inserting exactly one character into 't'. The inserted character must be equal to a character in 's'.
#1. Maximum Number of Subsequences After One Inserting
You are given a binary tree. Place cameras on some nodes such that all nodes are either covered by a camera on itself, or on one of its parents or children. Minimize the number of cameras used.
#2. Binary Tree Cameras
Imagine you're watering a garden using strategically placed taps. Find the fewest taps you need to open to water the entire garden, given each tap's watering range.
#3. Minimum Number of Taps to Open to Water a Garden