Product Associate Interview Questions

4,701 product associate interview questions shared by candidates

Problem statement You are given a string 'STR' representing JSON object. Return an array of strings denoting JSON objects with proper indentation. Rules for proper indentation: 1. Every inner brace should increase one indentation to the following lines. 2. Every close brace should decrease one indentation to the same line and the following lines. 3. Every ‘,’ will mean a separate line. 4. The indents can be increased with an additional 4 spaces or ‘/t’. Example: Let the input be: "{A:"B",C:{D:"E",F:{G:"H",I:"J"}}}" Then we return the following array of strings: { A:"B", C: { D:"E", F: { G:"H", I:"J" } } } Note that for every new brace we are putting an additional 4 spaces or \t. Note: 1. [] and {} are only acceptable braces in this case.
avatar

Associate Product Engineer

Interviewed at Deltax

3.3
Jan 8, 2024

Problem statement You are given a string 'STR' representing JSON object. Return an array of strings denoting JSON objects with proper indentation. Rules for proper indentation: 1. Every inner brace should increase one indentation to the following lines. 2. Every close brace should decrease one indentation to the same line and the following lines. 3. Every ‘,’ will mean a separate line. 4. The indents can be increased with an additional 4 spaces or ‘/t’. Example: Let the input be: "{A:"B",C:{D:"E",F:{G:"H",I:"J"}}}" Then we return the following array of strings: { A:"B", C: { D:"E", F: { G:"H", I:"J" } } } Note that for every new brace we are putting an additional 4 spaces or \t. Note: 1. [] and {} are only acceptable braces in this case.

Viewing 201 - 210 interview questions

Glassdoor has 4,701 interview questions and reports from Product associate interviews. Prepare for your interview. Get hired. Love your job.