General & HR
Git, DSA, OOP, and behavioural rounds.
Q. Explain Git: merge vs rebase, and how to resolve a conflict. medium ›
Merge combines branches and keeps history with a merge commit. Rebase replays your commits on top of another branch for a linear history. A conflict happens when the same lines changed in both branches — you edit the marked sections, then git add and continue. Know add, commit, push, pull, branch, checkout, merge, stash, log.
Q. What is the difference between an array and a linked list? easy ›
| Array | Linked List | |
|---|---|---|
| Memory | Contiguous block | Scattered nodes connected by pointers |
| Access by index | O(1) — direct jump | O(n) — must traverse from head |
| Insert/Delete at middle | O(n) — elements must shift | O(1) — if you already have a reference to the node |
| Insert at end | O(1) amortized (dynamic array) | O(1) with a tail pointer |
| Cache performance | Excellent (data is adjacent) | Poor (nodes scattered in memory) |
| Memory overhead | None beyond the data | Extra pointer(s) per node |
When to use each:
- Array (or dynamic array /
ArrayList) — default choice when you need fast random access and iteration. - Linked list — useful when you need frequent insertions/deletions at arbitrary positions and don’t need index-based access (e.g., implementing queues, LRU caches).
In most modern languages (JavaScript, Python, Java), the built-in “list” or “array” is a dynamic array, not a linked list.
Q. What is Big-O notation? Give examples. medium ›
It describes how runtime/space grows with input size. O(1) constant (hash lookup), O(log n) binary search, O(n) a loop, O(n log n) good sorts, O(n^2) nested loops. Interviewers want you to state the complexity of your solution.
Q. Tell me about yourself. (HR) easy ›
Use a 60–90 second structure: present (who you are / your degree) → relevant skills & a project → why this role. Keep it technical and forward-looking, not your life story.
Mini-template: “I’m a final-year CS student specializing in web development. I recently built a full-stack project using React, NestJS, and MySQL where I [specific achievement]. I’m excited about this role because [reason tied to the company].”
Q. Explain the four pillars of OOP. easy ›
1. Encapsulation — bundling data and the methods that operate on it into a single unit (class), and restricting direct access to internals via access modifiers (private, public).
2. Abstraction — hiding complex implementation details and exposing only what the user needs. Example: you call array.sort() without knowing the sorting algorithm inside.
3. Inheritance — a class can extend another class, inheriting its properties and methods. Promotes code reuse. Example: Dog extends Animal.
4. Polymorphism — the same method name behaves differently depending on the object. Two forms:
- Compile-time (method overloading) — same name, different parameters.
- Runtime (method overriding) — subclass provides its own version of a parent method.
class Animal {
speak() { return "..."; }
}
class Dog extends Animal {
speak() { return "Woof!"; } // polymorphism (override)
}
OOP is not the only paradigm — functional programming avoids mutable state and emphasizes pure functions. Many modern codebases blend both.
Q. Process vs thread; synchronous vs asynchronous. medium ›
Process vs Thread:
- A process is an independent program in execution with its own memory space. Processes are isolated — one crashing doesn’t take down another.
- A thread is a lightweight unit of execution within a process. Threads share the same memory, making communication fast but introducing risks like race conditions.
| Process | Thread | |
|---|---|---|
| Memory | Separate | Shared |
| Creation cost | Heavy | Light |
| Communication | IPC (pipes, sockets) | Shared variables |
| Crash impact | Isolated | Can crash entire process |
Synchronous vs Asynchronous:
- Synchronous — each operation blocks until it completes before the next one starts. Simple but can waste time waiting (e.g., waiting for a database query).
- Asynchronous — an operation is started and the program continues without waiting. A callback, promise, or event fires when the result is ready.
// Synchronous -- blocks
const data = fs.readFileSync("file.txt");
// Asynchronous -- non-blocking
const data = await fs.promises.readFile("file.txt");
Node.js is single-threaded but handles concurrency via an async event loop, which is why understanding async is critical for backend JavaScript.
Q. How does HTTPS keep data secure? medium ›
HTTPS = HTTP + TLS (Transport Layer Security). It wraps normal HTTP traffic in an encrypted tunnel.
How the TLS handshake works (simplified):
- Client Hello — browser sends supported cipher suites and a random number.
- Server Hello — server picks a cipher suite and sends its SSL/TLS certificate (containing its public key).
- Certificate verification — the browser checks the certificate is signed by a trusted Certificate Authority (CA).
- Key exchange — using asymmetric cryptography (e.g., RSA or ECDHE), both sides agree on a shared secret.
- Symmetric encryption — all subsequent data is encrypted with a fast symmetric cipher (e.g., AES) using the shared secret.
What HTTPS provides:
- Encryption — an eavesdropper on the network can’t read the data.
- Integrity — data can’t be tampered with in transit without detection.
- Authentication — the certificate proves you’re talking to the real server, not an imposter.
HTTPS does not hide which domain you’re visiting (the SNI in the handshake is visible), and it doesn’t protect against vulnerabilities in the application itself (like XSS or SQL injection).
Q. What is your greatest weakness? easy ›
How to answer well:
- Pick a real, non-fatal weakness — something genuine that isn’t a core requirement for the role.
- Show self-awareness — explain how it has affected you.
- Demonstrate growth — describe concrete steps you’re taking to improve.
Example:
“I used to struggle with estimating how long tasks would take — I’d commit to tight deadlines and then rush to finish. I’ve started breaking work into smaller chunks and adding buffer time. I also use a simple task tracker now, and my estimates have gotten much more accurate over the last few months.”
Avoid:
- Cliche non-answers — “I’m a perfectionist” or “I work too hard” sound rehearsed and insincere.
- Red flags — don’t mention weaknesses that are critical for the job (e.g., “I don’t like working in teams” for a collaborative role).
- No weakness at all — saying “I can’t think of any” signals lack of self-awareness.
The interviewer isn’t looking for flawless candidates. They want to see honesty, maturity, and a growth mindset.
Q. Tell me about a challenge you faced. (use STAR) medium ›
Use the STAR framework to structure your answer clearly:
- S — Situation — set the scene. Where were you? What was the context?
- T — Task — what was your specific responsibility or goal?
- A — Action — what did you do? (Focus on your actions, not the team’s.)
- R — Result — what was the outcome? Use numbers if possible.
Example:
Situation: During my final-year project, our team of four had to build a full-stack app in 6 weeks, but two members dropped out after week 2.
Task: I needed to deliver the backend API and deployment, which was originally split across three people.
Action: I prioritized the core features, cut scope on nice-to-haves, set up a simple CI/CD pipeline to save manual deployment time, and held daily 15-minute syncs with my remaining teammate.
Result: We delivered on time with all core features working. The project scored 92% and the professor highlighted our API design as an example for future batches.
Tips:
- Prepare 2-3 STAR stories that can be adapted to different questions (challenge, teamwork, failure, leadership).
- Keep it under 2 minutes when speaking.
- Always end on the result — don’t leave the interviewer hanging.
Q. Why should we hire you? / Where do you see yourself in 5 years? easy ›
“Why should we hire you?”
Structure: match your skills to their needs + show eagerness to contribute.
“I’ve built projects with Node.js and React, which is your stack. I pick up new tools quickly — I taught myself Docker in a week for my last project. I’m eager to contribute to real production code and grow with mentorship from your team.”
Tips:
- Reference the job description — echo the skills and values they listed.
- Mention a specific project or achievement that proves your claim.
- Show enthusiasm without desperation.
“Where do you see yourself in 5 years?”
Structure: show growth ambition without locking into a rigid title.
“In 5 years I’d like to be a strong mid-to-senior engineer who can own features end-to-end and mentor newer developers. I’m especially interested in deepening my skills in system design and distributed systems.”
Tips:
- Align your growth direction with what the company offers.
- Avoid saying you want to leave, start your own company, or be in a completely different field.
- It’s okay to say you’re exploring — “I want to go deep in backend engineering, but I’m open to wherever my skills are most impactful.”
Q. Do you have any questions for us? easy ›
Always say yes. Having no questions signals disinterest. Prepare 3-5 questions and ask at least 2-3.
Good questions to ask:
- “What does the first 90 days look like for someone in this role?” — shows you’re thinking about contributing quickly.
- “How does the team do code reviews?” — signals you care about quality and collaboration.
- “What’s the biggest technical challenge the team is working on right now?” — shows genuine interest in the work.
- “How do junior engineers grow here? Is there mentorship or a structured path?” — demonstrates a growth mindset.
- “What does a typical sprint or development cycle look like?” — practical and relevant.
Questions to avoid:
- Anything easily found on the company website (shows you didn’t research).
- Salary and benefits in a first-round interview (unless they bring it up).
- “Did I get the job?” — puts the interviewer in an awkward spot.
Treat this as a two-way conversation. You’re also evaluating whether this company is the right fit for you.