CitadelSoftware Engineer InternSoftware Engineer InternQuestion #82
Implement a class for the game Connect 4.
Build Your Approach
State the assumptions, try a simple case, then work toward a general solution. Check the result and explain how it changes if an assumption changes.
Try the free diagnostic with worked solutions →Get Free Interview Prep Resources
More Citadel Software Engineer Intern Questions
Given an array v, find the number of pairs of indices (i, j) such that v[i] = v[j] = v[i+1] + v[i+2] + ... + v[j-1]. Your solution should have time complexity O(n log n).How would you solve a scheduling issue given a directed acyclic graph (DAG) of tasks and k computers? What if k is one or infinity?Design an algorithm to randomly select people in a city such that the probability of selecting someone from a given district is proportional to the district's population size. Additionally, discuss how you would test your implementation and optimize its runtime, considering repeated calls to the selection function with an acceptable error margin.If a Binary Search Tree was implemented incorrectly such that a node has a left child that is not smaller than itself, how would you detect this violation? What is the most efficient method to identify this issue?Given an n x n chessboard, return the minimum number of knight moves required to get from point (a, b) to point (c, d).
Practice the Reasoning Behind the Answer
Bring your target roles and interview timeline to a free quant consult. Discuss your preparation priorities and how Quant Blueprint’s lessons, practice and mock interviews can help.
Book a Free Quant ConsultYour goals · your preparation · your next steps