CHANGE Networks interview experience Real time questions & tips from candidates to crack your interview

Frontend Developer

CHANGE Networks
upvote
share-icon
1 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Journey
I focused on mastering React by starting with the fundamentals like JSX, components, props, state, and event handling. Then I advanced to hooks, Context API, performance optimizations, and error boundaries. Finally, I learned state management using Redux, including actions, reducers, and middleware, while practicing hands-on projects to reinforce concepts.
Preparation
Topics: React Fundamentals, Advanced React (Hooks, Context, Performance), Redux & State Management.
Application process
Where: Coding Ninjas Placement Cell
Eligibility: Any Graduate

Interview rounds

01
Round
Medium
Online Coding Interview
Duration
Interview date10 Mar 2025
Coding problem2

1. Convert Key-Value String to JavaScript Object

Write a function that takes a string formatted as key:value;key:value;... (e.g., "name:niraj;age:56;email:dhirajchaudhari@gmail.com") and converts it into a JavaScript object. Each key in the string should become a property of the object, and its corresponding value should be assigned to that property.

Edge Cases:

  • An empty string ("") should return an empty object {}.
  • If a key is repeated, only the last value should be retained (e.g., "name:dhiraj;name:john" results in {name: "john"}).
Problem approach

Split the String Use split(";") to separate key-value pairs. Iterate and Process Pairs Loop through each pair. Use split(":") to separate the key and value. Handle Edge Cases Ignore empty strings. If a key appears multiple times, only store the last occurrence. Return the Final Object Store parsed values in an object and return it.

2. Group Objects by Role

Given an array of objects, where each object has the properties role (string) and name (string), organize the data by grouping all names under their respective roles. For each unique role, create an array of names that belong to that role.

Example Input:

[
 { role: "admin", name: "Alice" },
 { role: "user", name: "Bob" },
 { role: "admin", name: "Charlie" },
 { role: "moderator", name: "David" }
]
 

Expected Output:

[
 { role: "admin", name: ["Alice", "Charlie"] },
 { role: "user", name: ["Bob"] },
 { role: "moderator", name: ["David"] }
]
 

Problem approach
  • Initialize an Empty Object We'll use an object (groupedData) to store roles as keys and an array of names as values. 
  • Iterate Over the Array Loop through each object in the given array. 
  • Extract the role and name from the current object. 
  • Check if the Role Already Exists in the Object If the role exists, push the name into the existing array. 
  • If the role doesn't exist, create a new entry with an array containing the current name. 
  • Convert the Object into an Array of Objects Since the output format requires an array of objects, we map the groupedData object into an array.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
8518 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3320 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 6 problems
Interviewed by Expedia Group
2580 views
0 comments
0 upvotes
Frontend Developer
1 rounds | 1 problems
Interviewed by CHANGE Networks
97 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Frontend Developer
3 rounds | 11 problems
Interviewed by Amdocs
2480 views
0 comments
0 upvotes