BNY Mellon Online Test Question

Правка en2, от Raghavan_CP, 2025-07-27 10:35:20

A subarray is considered compromised if the bitwise OR of all elements in any subarray is present in the subarray itself. Find the number of compromised subarrays in a given array of positive integers.

A subarray is defined as any contiguous segment of the array.

Example arr = [2, 4, 7] Answer = 5

Please help with the processing idea?

More Questions: Given an alphabet of size m, find the number of passwords of length n such that no character appears k or more times consecutively.(hard)

Given a graph, perform DFS traversal and output all distinct valid outputs (such as all unique DFS traversal paths or orders depending on the specific constraint). (Medium)

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Raghavan_CP 2025-07-27 10:35:20 334
en1 Английский Raghavan_CP 2025-07-26 11:54:40 376 Initial revision (published)