Pergunta de entrevista da empresa PayPal

Input: A string like {"a":"1", "b":"2","a":"foo"} Output: A JSON string: {"a":["1","foo"], "b":"2"}

Resposta da entrevista

Sigiloso

5 de nov. de 2017

use HashTable> outputJson to store the result. Store the input json in HashTable. If the value exists in outputJson, then append this value to linklist in existing json. else create a new link list and add it to output json

1