Recursion and stack limits
You're recursively walking a nested JSON document thousands of levels deep, and it crashes only on a background thread. What's the cause?
You're recursively walking a nested JSON document thousands of levels deep, and it crashes only on a background thread. What's the cause?
Secondary threads get a 512KB stack by default (the main thread gets 1MB), so deep recursion overflows. It crashes the moment frame size × depth exceeds the stack, which is why it passes on main and dies only in the background.
CS fundamentals and algorithmsShort answerBasics
Can you compare merge sort and quicksort: how each works, and their time and space…
#merge-sort
CS fundamentals and algorithmsShort answerAdvanced
You're given a specific UIView instance in an original view hierarchy, plus a copy of…
#recursion
NetworkingShort answerBasics
This is a senior iOS virtual onsite, live coding. You have to build, without searching…
#json
SwiftShort answerAdvanced
The server's JSON uses snake_case keys, and dates come as strings like…
#json