1p3a Question · Oct 2025 · UK

Marshallwace UK 2026 Summer Quant Internship Online Test

Quant OA Intern
1 reply

Question Details

This post was last edited by Eric4 on 2025-10-01 23:35. There were three questions in total, mainly dynamic programming related, with a time limit of 80 minutes. Task 1: You are given a string letters

Full Details

This post was last edited by Eric4 on 2025-10-01 23:35. There were three questions in total, mainly dynamic programming related, with a time limit of 80 minutes. Task 1: You are given a string letters made of N English letters. Count the number of different letters that appear in both uppercase and lowercase where all lowercase occurrences of the given letter appear before any uppercase occurrence. For example, for letters = "aaAbcCABBc" the answer is 2. The condition is met for letters ‘a’ and ‘b’, but not for ‘c’. Write a function that, given a string letters, returns the number of different letters fulfilling the conditions above. The following content requires points higher than 188. You can already browse Task 2: There is an array A, consisting of N integers, and two integers, L and R. Your task is to find the shortest fragment of consecutive elements of A that contains every integer from L to R inclusive. Write a function: that, given A, L and R, returns the length of the shortest fragment of A that contains all numbers from L to R. If no such fragment exists, the function should return −1. Task 3: You are given a matrix A consisting of N rows and M columns. Each field of the matrix contains a positive integer. You want to find a path consisting of neighboring fields. Two fields are neighboring if they share a common side. The path can start and end on any field and can turn left or right at most once. The product of a path is an integer obtained by multiplying all the integers on the path. Find such a path whose product contains the maximum possible number of trailing zeros. Write a function that, given a matrix of integers, consisting of N rows and M columns, returns the maximum number of trailing zeros that some path with at most one turn contains. Ask for rice plz plz

Free preview. Unlock all questions →

Topics

Arrays Strings Dynamic Programming