View hierarchy tree search
You're given a specific UIView instance in an original view hierarchy, plus a copy of that hierarchy with the same structure. How would you design a function that finds the corresponding view in the copy?
View hierarchy tree search
You're given a specific UIView instance in an original view hierarchy, plus a copy of that hierarchy with the same structure. How would you design a function that finds the corresponding view in the copy?
UIKitShort answerBasics
How would you write a function that starts at a root view and finds a view matching some …
#bfs #dfs #view-hierarchy
CS fundamentals and algorithmsShort answerAdvanced
An image mask comes as an N×M grid where 1 is foreground and 0 is background. How would y…
#bfs #dfs
CS fundamentals and algorithmsShort answerAdvanced
You're recursively walking a nested JSON document thousands of levels deep, and it crashe…
#recursion
CS fundamentals and algorithmsShort answerBasics
A home decor recommender follows a graph of room-to-room connections to find the minimum …
#bfs