Software Engineer Interview Questions and Answers

Software engineering interviews usually mix coding, computer-science fundamentals, a deep dive into your projects and, for experienced candidates, system design. Here are the questions that come up most, with short model answers.

Fundamentals

What is the difference between a process and a thread?

A process is an independent program with its own memory space. Threads are units of execution inside a process that share its memory, which makes them cheaper to create but means shared data needs synchronisation.

Explain the four pillars of OOP.

Encapsulation (bundling data with the methods that use it and hiding internals), abstraction (exposing only what is needed), inheritance (reusing behaviour from a parent class) and polymorphism (one interface, different implementations).

What is the time complexity of searching in a hash map?

O(1) on average, and O(n) in the worst case when many keys collide. Some implementations, such as Java's HashMap, improve the worst case by turning long collision chains into balanced trees.

SQL vs NoSQL: when would you use each?

SQL for structured data with relationships and strong consistency needs, such as orders and payments. NoSQL for flexible schemas, very high write volumes or simple key-based access, such as sessions, events or catalogues.

Coding round

Expect one or two problems on arrays, strings, hash maps, two pointers, trees, graphs or dynamic programming. Interviewers assess your approach as much as the final code: clarify the problem, discuss a brute-force solution, optimise, state the complexity, then code and test with edge cases.

System design (2+ years of experience)

Project and behavioral questions

Frequently asked questions

Do service companies ask system design?

Usually only for experienced roles. Freshers are more often asked fundamentals, coding and project questions.

Which language should I use in the coding round?

The one you are fastest and most accurate in, unless the job requires a specific language.

Related guides