Software Engineer for 15+ years • Algorithms, Distributed Systems, System Design, Computer Vision • Dad & husband • I write https://t.co/0II04k6k3Z
12 subscribers
Feb 1 • 8 tweets • 2 min read
Solving 300+ LeetCode problems doesn't mean you'll pass your coding interview.
What holds you back are not your coding skills but the way you approach problems.
If you want to do better, use this practical 7-step strategy: ↓
Step 1: Listen
Pay close attention to the problem description and catch every detail.
Each piece of information is crucial in finding the optimal solution.
For example, if the interviewer gives you sorted input data, this likely affects the optimal solution.
Jan 18 • 7 tweets • 2 min read
Many software engineers have trouble with recursion during coding interviews.
If you want to become good at solving such problems, learn these 6 templates: ↓
1. Iteration
Any problem that can be solved with loops can also be solved using recursion.
Sometimes recursion provides a more concise and elegant solution, even if less efficient.
Example:
- traversing a linked list in reverse order
Jan 11 • 8 tweets • 2 min read
The sliding window method isn't just a trick for coding interviews.
It's the cheat code for cracking most array and string problems.
Here's how you can quickly grasp and use it: [1/7] ↓
A sliding window is a subarray that moves from left to right through an array.
The window is defined by two pointers representing its left and right bound.
The window size can be fixed or variable.
[2/7]
Jan 4 • 5 tweets • 2 min read
Most developers don't use trees in their daily work.
But the reason is that they're avoiding tree problems.
You won't need to do that anymore once you know these 4 data structures: ↓ 1. Binary Search Trees (BST)
It's a constrained extension of a binary tree with a unique property.
Given a node, the value of its left child is less than or equal to the parent value.
The value of the right child is greater than or equal to the parent's value
The primary use cases of BSTs are:
- implement simple sorting algorithms
- maintain a sorted stream of data
- implement double-ended priority queues
The most popular BST implementations are balanced trees like Red Black or AVL.
Dec 4, 2024 • 6 tweets • 4 min read
If you want to get better at system design and scaling apps, read these blog posts from big tech companies (Netflix, Uber, Stripe, OpenAI, Airbnb..): ↓
1. Netflix: Extracting Image Metadata at Scale
Younger engineers seems to have a hard time understanding concepts like threads, CPUs, and cores.
But I remember feeling the same way before working on embedded systems.
I hope this can help some less experienced folks out there:
[1/6] ↓
A thread is a sequence of instructions executed by a processor.
Two decades ago, a single chip had only a processor and one hardware thread.
So, it could only execute one set of instructions at a time.
Nowadays, CPUs can handle multiple threads.
[2/6]
Oct 30, 2024 • 8 tweets • 5 min read
As a senior software engineer, you should read these famous white papers from big tech companies (AWS, Google, Meta,..): ↓
1. Dynamo: Amazon’s Highly Available Key-value Store
A lot of times, REST APIs need to return 100+ results.
API pagination is a way to break such data into chunks that are easy to work with.
This improves user experience and reduces server load.
These are the 3 kind of API pagination you need to know: ↓ 1. Offset-Based
The API uses two parameters: "offset" determines the position in the dataset, while "limit" specifies the maximum number of data to include on each page.
This approach became popular with apps using SQL, which already have LIMIT and OFFSET as part of the syntax.
Example: GET products?limit=20&offset40
Pros: It's simple to set up and lets you go straight to any page.
Cons: There are performance issues with large OFFSET values. It can cause data to be duplicated or skipped in dynamic datasets.
Oct 16, 2024 • 11 tweets • 3 min read
If you want to become a better senior software engineer, read these 10 articles: ↓
1. How to have better code reviews in your team.