Mock interview questions

Mock Interview Questions and Answers

The questions that come up in mock interviews for freshers and software engineers - HR and opening questions with sample answers, the technical questions campus and product company interviews ask, and Java and Python questions - plus how to answer so the interviewer can follow your thinking.

How a mock interview is structured

  • Opening (5 min): introductions and "tell me about yourself".
  • Projects (5-10 min): one project in depth - what you built, why, and what you would change.
  • Technical (25-40 min): a coding problem, a design question, or CS fundamentals, depending on the role.
  • HR / behavioural (5-10 min): strengths, weaknesses, a challenge you handled, why this company.
  • Your questions (5 min): always have two ready.

Common HR and opening questions, with sample answers

1. Tell me about yourself.

Present, past, future in about a minute. Example for a fresher: "I am a final-year computer science student at [college]. Over the last year I have focused on backend development - my main project is a ride-sharing backend in Java and Spring Boot that handles matching and payments, and I did a two-month internship building internal APIs at [company]. I enjoy problems where the design matters as much as the code, which is why this role interests me."

2. Walk me through your project.

The problem it solves, your part in it, one technical decision you made and why, and one thing you would do differently. Interviewers dig into the decision, so pick one you can defend - "I used Redis for the session cache because reads outnumbered writes ten to one" is better than a list of technologies.

3. What are your strengths?

One or two, each with evidence. "I debug methodically - in my internship I traced a memory leak to an unclosed connection pool by bisecting deployments" beats "I am hardworking and a team player".

4. What is your biggest weakness?

A real one that does not disqualify you, plus what you are doing about it. "I used to jump into code before thinking through edge cases. I now write the test cases first, which has cut the bugs I ship."

5. Why do you want to work here?

Something specific about the company's product or engineering, connected to what you want to learn. Read their engineering blog or product before the interview; generic answers about "growth" and "reputation" score nothing.

6. Tell me about a time you faced a challenge.

Use STAR: the situation, your task, the actions you took (most of the answer), and the result, with a number if possible. Freshers can use a project deadline, a team disagreement or a bug that took days to find.

7. Where do you see yourself in five years?

Growing depth in the kind of work this role does - "owning a service end to end and mentoring newer engineers" - rather than a title or a different career.

8. Why should we hire you?

Match two or three things the role needs with evidence that you have them. Keep it to thirty seconds and do not compare yourself with other candidates.

9. Do you have any questions for us?

Always yes. "What does a new engineer's first month look like?" or "What is the hardest technical problem the team is working on?" Avoid questions about leave and salary in a technical round.

Technical mock interview questions for freshers

OOP

  • What are the four pillars of OOP? Give a real example of each.
  • What is the difference between method overloading and overriding?
  • Abstract class vs interface - when would you use each?
  • What is the difference between composition and inheritance, and why is composition often preferred?

DBMS and SQL

  • What are the ACID properties?
  • Explain normalisation up to 3NF with an example.
  • Inner join vs left join - write a query using each.
  • What is an index, and what does it cost?
  • Find the second-highest salary from an Employee table.

Operating systems

  • Process vs thread.
  • What is a deadlock, and what are the four conditions for one?
  • What are paging and virtual memory?
  • Mutex vs semaphore.

Computer networks

  • TCP vs UDP, and where you would use each.
  • What happens when you type a URL into the browser and press Enter?
  • What are HTTP and HTTPS, and how does TLS protect the connection?

DSA (coding)

  • Reverse a linked list; detect a cycle in it.
  • Two sum; longest substring without repeating characters.
  • Valid parentheses using a stack.
  • Level-order traversal of a binary tree; maximum depth.
  • Binary search on a rotated sorted array.

Practise these with code that runs against test cases on the DSA practice problems, or take a timed DSA mock interview. The mock interview for freshers page explains how an entry-level loop runs.

Mock interview questions for software engineers

Coding rounds

  • Merge overlapping intervals; meeting rooms.
  • LRU cache with O(1) get and put.
  • Top K frequent elements; median of a data stream.
  • Number of islands; course schedule (topological sort).
  • Longest increasing subsequence; coin change.

Low level design (LLD)

  • Design a parking lot, an elevator system, or Splitwise.
  • Design a rate limiter class, or an in-memory key-value store with TTL.
  • How would your design change if [a new requirement] were added?

All of these are on the LLD interview questions page, with change requests and hidden tests.

System design (HLD)

  • Design a URL shortener, WhatsApp, or YouTube.
  • Design a ticket booking system that never double-books a seat.
  • How would you scale a service from 1,000 to 10 million users?

See the system design interview questions and how to prepare for a system design interview.

Behavioural

  • Tell me about a time you disagreed with your manager or a teammate.
  • Tell me about a production incident you handled.
  • Tell me about a project you owned end to end.
  • Tell me about a mistake you made and what changed afterwards.

Practise them in a behavioural mock interview.

Java mock interview questions

  • How does HashMap work internally, and what changed in Java 8?
  • Why must you override hashCode when you override equals?
  • Why are Strings immutable in Java?
  • Explain the JVM memory areas - heap, stack, metaspace.
  • How does garbage collection decide what to collect?
  • Checked vs unchecked exceptions.
  • final vs finally vs finalize.
  • synchronized vs volatile; what is a race condition?
  • What are streams and lambdas, and when would you avoid them?
  • ArrayList vs LinkedList - which would you use and why?

Python mock interview questions

  • List vs tuple; when is a tuple the right choice?
  • What is the GIL, and how does it affect multithreading?
  • What are decorators? Write one that times a function.
  • Generators vs lists - what does yield change?
  • Why is a mutable default argument a bug?
  • Shallow copy vs deep copy.
  • What do *args and **kwargs do?
  • How are dictionaries implemented, and why are lookups O(1) on average?

How to answer any mock interview question

  • Clarify first. Restate the question and ask about inputs, scale or constraints before answering.
  • Think out loud. The interviewer grades your reasoning, and can only grade what they hear.
  • Start simple, then improve. A correct brute force stated clearly beats a half-finished optimal solution.
  • Use STAR for behavioural questions, and spend most of the answer on what you did.
  • Admit what you do not know, then reason towards an answer. Bluffing is easy to spot.

Practise these questions in a mock interview

Reading this page is the first step; saying the answers under time pressure is the one that changes how you do. Take a free mock interview or an AI mock interview to rehearse as often as you like, and book a live mock interview online with an engineer when you want a real verdict. You can print this page or save it as a PDF from your browser to revise offline.

Mock interview questions FAQ

What questions are asked in a mock interview?

The same ones as the real interview it is rehearsing. For a software engineering role that means an opening "tell me about yourself", one or two technical problems (DSA coding, low level design or system design depending on level), questions about your projects, a few behavioural or HR questions, and a chance for you to ask questions at the end.

What are the 7 most common interview questions?

Tell me about yourself; walk me through a project; what are your strengths; what is your biggest weakness; why do you want to work here; tell me about a time you faced a challenge or conflict; and do you have any questions for us. Prepare a structure for each rather than a script.

What is the 30-60-90 rule in an interview?

It usually refers to a 30-60-90 day plan: what you would learn in your first 30 days, start contributing in the next 30, and own by day 90. It comes up more for experienced hires than freshers. A good answer is specific to the role - for an engineer, learning the codebase and shipping a small fix first, then a feature, then owning a component.

How should I answer "tell me about yourself" in a mock interview?

In about 60-90 seconds: who you are now (degree or current role), one or two things you have built that are relevant to this job, and why you are applying. Skip your hometown and hobbies unless asked. End on something the interviewer can follow up on, such as a project.

How do I practise these questions?

Out loud, against a clock, with someone asking follow-ups. Reading answers builds familiarity; only saying them exposes the gaps. A free AI mock interview lets you rehearse technical and behavioural rounds as often as you like, and a live 1:1 gives you a real interviewer's verdict.