注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
一共三道题
第一题是 find loops in linkedlist
第二题是 Question 2 / 3 (Q9. SI)
Given a list of test results (each with a test date, Student ID, and the student’s Score), return the Final Score for each student. A student’s Final Score is calculated as the average of his/her 5 highest test scores. You can assume each student has at least 5 test scores.
You may use the JDK or the standard template library. The solution will be evaluated on correctness, runtime complexity (big-O), and adherence to coding best practices. A complete answer will include the following:
Document your assumptions
Explain your approach and how you intend to solve the problem
Provide code comments where applicable
Explain the big-O run time complexity of your solution. Justify your answer.
Identify any additional data structures you used and justify why you used them.
Only provide your best answer to each part of the question.class TestResult
Use one of the following skeletons for your solutions.
Java:
class TestResult {
int studentId;
String testDate;
int testScore;
}
public class FinalScoreQuestion {
Map <Integer, Double> calculateFinalScores (List<TestResult> results) {}
第三题是合并链表题
第二题 之前看别人的帖子写的是 find close k points near origin out of n points,本质上和这道题没什么区别。
|