maxPossibleScore
Description:
You're a teacher preparing a test for your students. Each question is worth some number of points. Some of the questions are new to the students, while others are questions they have already seen and practiced. Your scoring system doubles the value of new questions. Your job is to determine the maximum possible score.
Write a function doubleValue that accepts 1) an object of questions (as keys) and points (values) and 2) an array of new questions. The function should return the test's maximum possible score as an integer, where questions that are new are worth double points.
You can assume that all questions are unique.
Questions are case sensitive.
Example: maxPossibleScore({"a": 1, "b": 2, "c": 3}, ["a", "c"]); // 1 * 2 + 2 + 3 * 2 = 10
Stats:
Created | Jul 12, 2017 |
Published | Jul 12, 2017 |
Warriors Trained | 1448 |
Total Skips | 18 |
Total Code Submissions | 8855 |
Total Times Completed | 858 |
JavaScript Completions | 722 |
C# Completions | 90 |
Ruby Completions | 61 |
Total Stars | 25 |
% of votes with a positive feedback rating | 83% of 189 |
Total "Very Satisfied" Votes | 142 |
Total "Somewhat Satisfied" Votes | 30 |
Total "Not Satisfied" Votes | 17 |
Total Rank Assessments | 14 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 7 kyu |