FastPrepConvert an Entry List to a Map
Problems/Convert an Entry List to a Map

Convert an Entry List to a Map

EPAM logoEPAM● EasyFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report names the task of converting a list to a map. We chose how entries are written, what happens with duplicate keys, the order of the output, the limits, and the function signature. Our version is about 80% the same as the reported question.

Each string in entries has the form key=value.

Convert the list into key-value rows. When a key appears more than once, keep its last value. Return rows as [key, value], sorted by key in ascending lexicographic order.

Function

listToMap(entries: String[]) → String[][]

Examples

Example 1

entries = ["color=blue","size=large","color=green"]return = [["color","green"],["size","large"]]

The final color replaces the earlier value, and keys are sorted.

Example 2

entries = ["a=1"]return = [["a","1"]]

One entry produces one row.

Constraints

  • 1 <= entries.length <= 10000.
  • Keys and values are nonempty lowercase alphanumeric strings.
  • Each entry contains exactly one =.

Source note: Author-written prompt excerpt retained for source fidelity.

More EPAM Phone Screen questions

  • Longest Palindromic SubstringPHONE SCREEN · Seen Oct 2026
  • Container With Most WaterPHONE SCREEN · Seen Oct 2026
  • Count Array Element FrequenciesPHONE SCREEN · Seen Oct 2026
  • Find First and Last Position of Element in Sorted ArrayPHONE SCREEN · Seen Oct 2026
  • Group AnagramsPHONE SCREEN · Seen Oct 2026
  • Longest Consecutive SequencePHONE SCREEN · Seen Oct 2026
  • Max Consecutive Ones IIIPHONE SCREEN · Seen Oct 2026
  • Minimum Currency ConversionsPHONE SCREEN · Seen Oct 2026
  • Next Greater Element IPHONE SCREEN · Seen Oct 2026
  • Partition and Group Values by ParityPHONE SCREEN · Seen Oct 2026

Similar questions at other companies

  • Shared Courses for Every Pair of StudentsCrunchyroll · PHONE SCREENCrunchyroll interview questions
  • Remove Later Anagrams From a ListBloomberg LP · PHONE SCREENBloomberg LP interview questions
  • Employees With Shared InterestsPalantir · PHONE SCREENPalantir interview questions
  • Folder Snapshot DiffAirbnb · PHONE SCREENAirbnb interview questions
  • Group AnagramsWorkday · PHONE SCREEN
  • Process Shopping Records, Promotions, and Display OrderInstacart · PHONE SCREEN · ONSITE INTERVIEWInstacart interview questions
  • Find Duplicate File GroupsAnthropic · PHONE SCREENAnthropic interview questions
  • Insert an Employee into an Organization HierarchyWaymo · PHONE SCREENWaymo interview questions
  • Group AnagramsMotive · PHONE SCREEN · ONSITE INTERVIEWMotive interview questions
  • Stable Top K Frequent WordsGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
All EPAM interview questionsSee EPAM hiring insights
Saved
class Solution {
    public String[][] listToMap(String[] entries) {
        // Write your code here.
    }
}
Checking account…