Software Engineer (Fresher) interview questions and answers (2026)
The Software Engineer (Fresher) questions candidates are most often asked, covering aptitude, programming basics, data structures, OOP, DBMS. Each answer is short enough to say out loud. For the full process, scenario and HR questions and a 48-hour plan, open the guide for your company below.
Preparing for a Software Engineer (Fresher) interview? Rehearse these questions with Interview AI Helper: ask any question and get a suggested answer in seconds, written from your own resume.
Free 5-minute demoSoftware Engineer (Fresher) interview guides by company
- Accenture Software Engineer (Fresher) interview questions
- Amazon Software Engineer (Fresher) interview questions
- Infosys Software Engineer (Fresher) interview questions
- TCS Software Engineer (Fresher) interview questions
- Wipro Software Engineer (Fresher) interview questions
Most asked Software Engineer (Fresher) questions
What is the difference between an algorithm and a flowchart?
An algorithm is a step by step written solution to a problem, while a flowchart is a visual representation of those steps using symbols and arrows. The algorithm focuses on logic, and the flowchart helps people understand the process quickly. In interviews, I would say both are used to plan a solution before coding.
What is the difference between an array and a hash map?
An array stores elements in contiguous memory and is best when you need indexed access. A hash map stores key value pairs and is best when you need fast lookup by key. array access by index is usually O(1), while hash map lookup is often O(1) on average. Choose an array for ordered data and a hash map for fast search by key.
How do recursion and iteration differ?
Recursion solves a problem by calling the same function again with a smaller input until a base case is reached. Iteration uses loops like for or while to repeat steps. Recursion is often cleaner for tree and divide and conquer problems, but it can use more stack memory. Iteration is usually more memory efficient and easier to control for many basic tasks.
What is the difference between an array and a linked list?
An array stores elements in contiguous memory, so access by index is fast, usually O(1). A linked list stores nodes separately and connects them with pointers, so insertion and deletion are easier when you already have the node, but access is slower because you must traverse from the head. I would choose an array for fast random access and a linked list when frequent insertions and deletions are needed.
Explain the difference between a stack and a heap memory allocation.
Stack memory is used for static allocation, storing function call frames, local variables and return addresses; it grows and shrinks automatically as functions are entered and exited. Heap memory is used for dynamic allocation, where objects are created at runtime with new or malloc; it must be manually managed or garbage‑collected, and its size is limited only by system resources.
What is the difference between break and continue in a loop?
break stops the loop completely and moves control to the next statement after the loop. continue skips only the current iteration and then goes to the next one. For example, break is useful when a condition is met and no more looping is needed, while continue is useful when one value should be ignored.
What is time complexity, and why does it matter?
Time complexity tells how runtime grows as input size increases. It helps compare solutions without depending on machine speed. For example, O(n) grows linearly, while O(n^2) becomes slow for large inputs. In interviews, explain the best, average, and worst case if relevant, and choose the approach that scales well.
What is the time complexity of binary search, and when can it be used?
Binary search has time complexity O(log n). It works only on sorted data or data that can be searched in sorted order. At each step, it compares the middle element and discards half of the search space. It is much faster than linear search for large sorted arrays, but it is not suitable for unsorted data without sorting first.
What are the main principles of OOP?
The four main principles are encapsulation, inheritance, polymorphism, and abstraction. Encapsulation means keeping data and methods together and controlling access with private or public. Inheritance helps reuse code from a parent class. Polymorphism lets the same method behave differently in different classes. Abstraction means showing only essential details and hiding implementation details.
What is a linked list and when would you prefer it over an array?
A linked list is a collection of nodes where each node contains data and a reference to the next node. It allows O(1) insertion or deletion at the ends or any known position without shifting elements, unlike arrays which require O(n) shifts. Prefer a linked list when the size changes frequently or memory reallocation cost is high, and random access is not critical.
What is the difference between a class and an object?
A class is a blueprint, and an object is an actual instance of that blueprint. The class defines data and behavior, while the object stores real values and uses those behaviors. For example, Car can be a class, and my car with a specific color and model is an object.
What is a queue, and where is it used?
A queue follows FIFO, first in, first out. The first item added is the first one removed. It is used in task scheduling, print spooling, breadth first search, and request handling systems. In Amazon style systems, queues are useful when many requests must be processed in order without blocking the entire service.
What is the difference between == and equals() in Java?
== checks whether two references point to the same object, or compares primitive values directly. equals() checks logical equality of objects, if it is overridden properly in the class. For strings and custom objects, equals() is usually the right method when you want to compare content. In interviews, mention that hashCode() should also be consistent with equals().
What is the difference between SELECT, WHERE, and HAVING in SQL?
SELECT chooses which columns to display. WHERE filters rows before grouping, so it works on individual records. HAVING filters grouped results after GROUP BY, so it is used with aggregate functions like COUNT() or SUM(). A simple example is using WHERE salary > 50000 for rows, and HAVING COUNT(*) > 5 for groups.
Describe the purpose of a hash function in a hash map.
A hash function converts a key into an integer index that determines where the associated value is stored in the underlying array. A good hash function distributes keys uniformly to minimize collisions, ensuring average‑case O(1) lookup, insertion and deletion. It should be fast to compute and produce the same index for identical keys.
Software Engineer (Fresher) interview coming up?
Practise these Software Engineer (Fresher) questions out loud and get suggested answers in real time, based on your own resume. Free 5-minute demo, no subscription.
Try the free demo