Q81. How does copy-on-write work for Swift collections?
Swift collections such as `Array`, `Dictionary` and `String` are value types with copy-on-write. Copying a variable is cheap because both copies share the same buffer unt...
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (182 available).
Swift collections such as `Array`, `Dictionary` and `String` are value types with copy-on-write. Copying a variable is cheap because both copies share the same buffer unt...
Variance describes how generic types relate when their type arguments are related. `out T` (covariant) means `Producer` can be used where `Producer` is expected. `in T` (...
A classic deadlock happens in UI applications and classic ASP.NET when you block synchronously on async code with `.Result` or `.Wait()`. The awaited task wants to resume...
The rule of three: if a class needs a custom destructor, copy constructor or copy assignment operator, it probably needs all three, because they manage the same resource....
An `async fn` returns a `Future`, a state machine that does nothing until polled. An executor such as Tokio drives it. `.await` yields control while the future is pending...
Go's advice is "do not communicate by sharing memory; share memory by communicating", but both tools are legitimate. - Use a mutex when protecting a small piece of shared...
Legacy code is often defined as code without tests, which makes changing it risky. The core technique is to introduce a seam, a place where behaviour can be substituted w...
Two-phase commit, 2PC, is an atomic commit protocol for transactions spanning multiple databases or resource managers. Phase one, prepare: the coordinator asks every part...
TCP congestion control keeps the sender from overwhelming the network. The sender maintains a congestion window, cwnd, and sends at most the minimum of cwnd and the recei...
The Banker's algorithm grants a resource request only if the resulting state is safe, meaning some order exists in which all processes can finish. Inputs are the maximum ...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.