Sr Developer Interview Questions

30,121 sr developer interview questions shared by candidates

Suppose we have some input data describing a graph of relationships between parents and children over multiple families and generations. The data is formatted as a list of (parent, child) pairs, where each individual is assigned a unique positive integer identifier. For example, in this diagram, 3 is a child of 1 and 2, and 5 is a child of 4: 1 2 4 30 \ / / \ \ 3 5 9 15 16 \ / \ \ / 6 7 12 Sample input/output (pseudodata): pairs = [ (5, 6), (1, 3), (2, 3), (3, 6), (15, 12), (5, 7), (4, 5), (4, 9), (9, 12), (30, 16) ] Write a function that takes this data as input and returns two collections: one containing all individuals with zero known parents, and one containing all individuals with exactly one known parent. Output may be in any order: findNodesWithZeroAndOneParents(pairs) => [ [1, 2, 4, 15, 30], // Individuals with zero parents [5, 7, 9, 16] // Individuals with exactly one parent ] Complexity Analysis variables: n: number of pairs in the input
avatar

Senior Developer

Interviewed at Mercari

3.4
Aug 15, 2023

Suppose we have some input data describing a graph of relationships between parents and children over multiple families and generations. The data is formatted as a list of (parent, child) pairs, where each individual is assigned a unique positive integer identifier. For example, in this diagram, 3 is a child of 1 and 2, and 5 is a child of 4: 1 2 4 30 \ / / \ \ 3 5 9 15 16 \ / \ \ / 6 7 12 Sample input/output (pseudodata): pairs = [ (5, 6), (1, 3), (2, 3), (3, 6), (15, 12), (5, 7), (4, 5), (4, 9), (9, 12), (30, 16) ] Write a function that takes this data as input and returns two collections: one containing all individuals with zero known parents, and one containing all individuals with exactly one known parent. Output may be in any order: findNodesWithZeroAndOneParents(pairs) => [ [1, 2, 4, 15, 30], // Individuals with zero parents [5, 7, 9, 16] // Individuals with exactly one parent ] Complexity Analysis variables: n: number of pairs in the input

Q1 : What is props drilling in ReactJS? Q2 : What is synthetic event in ReactJS? Q3 : What is react life cycle? Q4 : How you can demonstrate html page having video playing on load? Q5 : How do you put a background image in CSS stylesheet? Q6 : How to find object is array or object? Q7 : Find key from an object? const obj=[id1:1, id2:2] // findFun(id1) -> id1:1
avatar

Senior Frontend Developer

Interviewed at Hinduja Tech

3.2
Sep 30, 2020

Q1 : What is props drilling in ReactJS? Q2 : What is synthetic event in ReactJS? Q3 : What is react life cycle? Q4 : How you can demonstrate html page having video playing on load? Q5 : How do you put a background image in CSS stylesheet? Q6 : How to find object is array or object? Q7 : Find key from an object? const obj=[id1:1, id2:2] // findFun(id1) -> id1:1

Viewing 2951 - 2960 interview questions

Glassdoor has 30,121 interview questions and reports from Sr developer interviews. Prepare for your interview. Get hired. Love your job.