Practice thousands of problems and hundreds of interview questions
Smash the interview and land your dream job. Sharpen your soft and hard skills to land your dream job.
Implement a single-writer, multiple-reader, writes-always-succeed data structure.
You're writing a trading system that requires market data to be written immediately to a buffer. The alternative is to wait for readers to be done before writing. This adds latency to the market data write-thread and increases the risk that the internal network card buffer overflows and starts dropping packets.
Packet drops cannot be tolerated since they are expensive to recover from and delay trading activity. This data structure will be used in your feedhandlers, freeing the market data thread with instantly-completing writes.
At this level of design, requirements are often vague. As a developer, your job is to understand the context that this data structure exists in, and build it while being able to explain the trade-offs of your decisions..
Ultimately, there will be submissions that are more efficient that others, and so you should aim for your submission to achieve a runtime and memory usage that is on the efficient frontier.
Context
- Your data structure will contain small types that are default and copy constructible.
- Given that writes must be instant, your implementation cannot use any threading primitives that would lead to waiting (e.g.
std::mutex,std::condition_variable, etc). - There will only ever be one writer, but there can be multiple readers. A writer can write at the same time that readers read!
- If nothing has yet been written, reads can still succeed, but callers will inspect the return value to understand whether the read was successful.
Test cases
| Test | Description |
|---|---|
write-while-read | Writing is allowed while values are being read. Poorer implementations that are otherwise correct will suffer here. |
read | Read the last written value. |
read-many | Read a series of updates. |
empty-read | You read before anything was written. |
namespace getcracked {
template <typename Element>
class InstantWriteMultipleRead {
public:
void Write(const Element& value) {
// Implement here.
}
bool Read(Element& out) const {
// Implement here.
}
private:
};
}Successful placements everywhere.
Practice in your language
Real interview problems from top tech companies. Master the fundamentals that interviewers actually ask.
Three by three
What is the value of grid after running this code?
grid = [[0] * 3] * 3
grid[0][0] = 3Quizzes
Take a quiz to test your knowledge and see how you stack up against other candidates.
[0% - 10%)
[10% - 20%)
[20% - 40%)
[40% - 50%)
[50% - 80%)
[80% - 90%)
[90% - 95%)
[95% - 99%)
99%+
Why getcracked?
In the age of AI, the knowledge round will be the defacto technical screen. Stay ahead of the competition!
Hundreds of problems
Our library grows daily with real questions contributed by users fresh from their interviews. You'll practice the exact problems companies are asking right now, not outdated ones from years ago.
Rankings and benchmarking
See exactly where you stand with our live leaderboard and percentile rankings. We track your progress against thousands of other candidates, so you'll know when you're ready to ace the real thing.
You are hired!
Congratulations on your new job!
Proven results, real job offers
Join hundreds of users who have landed dream jobs at companies like SpaceX, Jane Street, and Citadel. A small investment in prep can lead to life-changing offers and huge salary jumps.
How we compare
See what makes getcracked different from traditional coding interview platforms.
| Features | getcracked | Neetcode | Leetcode | AlgoExpert |
|---|---|---|---|---|
| Data Structures | ||||
| Contrived Toy Coding Puzzles | ||||
| Catered Playlists | ||||
| Detailed Solutions | Partial | Partial | ||
| Ranking and Benchmarking | ||||
| Operating Systems | ||||
| Concurrency | ||||
| Computer Architecture | ||||
| Design Patterns | ||||
| Practical Coding Problems | ||||
| Behavioral Interview Videos | ||||
| Exclusive Quizzes | ||||
| You'll get cracked. |
Pricing
Unlock advanced filtering, hundreds of premium questions, video interview guides, and exclusive insider community access.
Monthly
Unrestricted platform access.
- Access to all questions, problems, and quizzes
- Interview video guides
- Advanced filtering and question playlists
- 5% off all coaching services (pays for itself)
- Insider community access
Annual(-33%)
Unrestricted platform and community access.
- Access to all questions, problems, and quizzes
- Interview video guides
- Advanced filtering and question playlists
- 15% off all coaching services (pays for itself)
- Access to a community with the most working quants
Real success stories
See how our members: turned a $20 subscription into a $200K+ career.
FAQ
Find answers to common questions about our platform, pricing, and process.
Land your dream job
Join 70,000+ developers who are getting hired faster with getcracked.