Frage im Vorstellungsgespräch bei PayPal

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

Antwort im Vorstellungsgespräch

Anonym

5. Nov. 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