Showing 3 of 12 questions
Find the maximum length of a contiguous subarray within a given array whose product is positive. You need to consider both positive and negative numbers.
#1. Maximum Length of Subarray With Positive Product
Imagine cars moving in different directions on a one-lane road. Calculate the total number of collisions that will occur based on the cars' directions.
#2. Count Collisions on a Road
Given a complete binary tree where nodes are numbered sequentially, calculate the length of the path between two nodes after adding an edge between them. You will process multiple queries, each asking for the path length after a specific connection is made.
#3. Cycle Length Queries in a Tree
Page 1 of 1 · 12 total