Developer Interview Questions

269,109 developer interview questions shared by candidates

1. Lock and Unlock a node of the given tree, Structure of the tree: one root multiple childs (>2). problem: find solution for locking and unlocking the nodes logic with log(N) complexity. Lock(node): returns boolean we can lock the node if and only if ancestor nodes and descendant nodes are not locked. if they are locked then return false else return true Unlock(node): returns boolean if node is already locked then unlock it and return true else return false
avatar

Software Developer

Interviewed at JUSPAY

4
Dec 28, 2019

1. Lock and Unlock a node of the given tree, Structure of the tree: one root multiple childs (>2). problem: find solution for locking and unlocking the nodes logic with log(N) complexity. Lock(node): returns boolean we can lock the node if and only if ancestor nodes and descendant nodes are not locked. if they are locked then return false else return true Unlock(node): returns boolean if node is already locked then unlock it and return true else return false

Viewing 951 - 960 interview questions

Glassdoor has 269,109 interview questions and reports from Developer interviews. Prepare for your interview. Get hired. Love your job.