Coding interview preparation
5.82K subscribers
459 photos
80 files
164 links
Download Telegram
System Design Blueprint

This template helps to tackle various system design problems in interviews.

Hope this checklist is useful to guide your discussions during the interview process.

This briefly touches on the following discussion points:
- Load Balancing
- API Gateway
- Communication Protocols
- Content Delivery Network (CDN)
- Database
- Cache
- Message Queue
- Unique ID Generation
- Scalability
- Availability
- Performance
- Security
- Fault Tolerance and Resilience
- And more
2
SQL question:

What will this query return?
Coding interview preparation
SQL question: What will this query return?
Hey everyone, quick follow-up to today’s SQL quiz!👇

The query was:
SELECT COUNT(*) FROM employees HAVING COUNT(*) > 0;

Our active members picked B) 1, C) 0 or D) Error… but let’s break it down real quick!

➡️ COUNT(*) in the SELECT counts ALL rows in the table → with 10 rows it returns 10

➡️ The HAVING clause filters after aggregation

➡️ HAVING COUNT(*) > 0 simply checks if the total count is greater than 0 (which it always is unless the table is empty)

🟢 So the query returns exactly one row with the value 10.

The question was a valid (just a bit tricky/wordy) way to write
give me the total row count, but only if there’s at least one row



Correct answer: A) 10

Unfortunately no one got it right😅
Better luck next time folks, you’re all still SQL legends in my book! 💙
3
SSH Under the hood
SQL Question:

Query Optimization

Which query are you running and why?
8 Popular Network Protocols Explained in 1 Simple Diagram
You're giving an interview, and the interviewer asks,

What is the difference between CHAR and VARCHAR2 datatype in SQL?


Here's how you can answer:

Sample Answer:

CHAR and VARCHAR2 are both used to store text in SQL, but they work differently. CHAR is fixed-length, meaning it always uses the same amount of space no matter how short the text is. For example, if you set a column to CHAR(10) and store ‘Hi’, it will still take up 10 spaces, adding extra padding to fill the space. This can waste storage but is consistent in size.

VARCHAR2, on the other hand, is variable-length, so it only uses as much space as needed for the text. If you set a column to VARCHAR2(10) and store ‘Hi’, it only takes 2 spaces plus a little extra to store the length, saving space.

Use CHAR when your data is always the same length, like codes or short identifiers. Use VARCHAR2 when your data varies in length, like names or descriptions. CHAR can be slightly faster for fixed-length data, but VARCHAR2 is more efficient for saving space and handling different text lengths.
3
How Does HTTPS Work?
10 Types of API Testing
2
Big Data Pipelines on the Cloud
Session, JWT, SSO, and OAuth 2.0 in One Diagram
Key Database Sharding Concepts
API Security 101