I just recently finished a session with a student Citadel Online Assessment. This classmate has a master's degree in CS in North America. He usually has a good foundation in algorithms, but does not have much experience in OA in quantitative companies. This student finished the whole session and completed all ACs in about ten minutes. In summary, it was relatively smooth. Let’s briefly organize the ideas for two of the more representative questions in this OA to provide a reference for students preparing for the written exam at Citadel or similar quantitative companies.
Optimize with up to k substitutions
Question description
Calculate the maximum total revenue that can be obtained with up to k additional working days based on the work schedule. Work rules: Get a fixed daily salary + bonus for consecutive working days, recalculated after interruption.
Problem-solving ideas
Count the original number of working days cnt1 and the number of consecutive working segments runs. If there are no working days, the income within k days will be calculated directly. Otherwise, collect the number of idle days between each segment, give priority to filling shorter idle days with k to merge work segments (reduce runs), and use the remaining k to increase working days. Final total income = (fixed daily salary + bonus) × total working days – bonus × runs.
All valid sizes of memory blocks
Question description
Given an array of memory blocks, find all possible valid memory block sizes such that certain conditions are met after allocation (involving counting and free space judgment).
Problem-solving ideas
Count the number of occurrences of each value, and iterate over and calculate the cumulative available count M. Depending on M and array length n and cnt[0], values in the range 0, 1 to M, and possibly n-1 and n are added as valid sizes.
What to do with OA written test card questions
In summary, the difficulty of Citadel's OA is not as exaggerated as imagined. The key is to have fast thinking and stable code. When many students do OA for quantitative companies, it’s not that they don’t know the questions, but they tend to get stuck in several places. If you are worried that you will get stuck in ideas, fix bugs for too long, or don’t have enough time during the formal written test, many students will now find some in advance. OA real-time assistance Prepare together. If you happen to be doing a quantitative company OA/big factory Coding Test recently, please contact us to find out.