SIG (Susquehanna)Software EngineerSoftware DeveloperQuestion #41
A group of friends are tracking the miles per gallon (MPG) for each of their cars. Each time they fill up their gas tank, they record the following in a CSV file: person name, car name, miles driven since last fill-up (float), gallons filled at this fill-up (integer), and the fill-up date. Write a program that lets a group member determine the MPG for each of their cars during a specific time range. The principal function for querying MPG is: GetRangeMPG(PersonName, StartDate, EndDate), which returns a list of objects containing (CarName, MPG), where MPG is calculated as (total miles driven during the time period) / (total gallons filled during that time period). The query's date range should be treated inclusively.
Unlock the Full Solution
Enter your email to get the detailed step-by-step solution to this SIG (Susquehanna) interview question, plus access to free interview prep resources.
We'll also send you a free HFT mock interview video.
More SIG (Susquehanna) Software Engineer Questions
Compress a string such that repeated characters are replaced by the character followed by the number of repetitions. For example, given 'AAABBCC', output 'A3B2C2'.Write a method that returns a stock ticker value based on a company name found within a string of text, which may also contain random words in addition to the company name. Optimize the method for performance, assuming there could be millions of companies to search through.Is 1599 a prime number?Given an array of integers and an integer k, find the k-th largest element in the array.Explain how hash tables work.
Get All 120+ SIG (Susquehanna) Questions with Solutions
Plus 16+ hours of video lectures, resume tailoring, and 1:1 mentorship from quants.
Schedule a Call