Software Engineer Trainee
300+ Software Engineer Trainee Interview Questions and Answers
You are given a singly Linked List of integers. Your task is to return true if the given singly linked list is a palindrome otherwise returns false.
For example:
The given linked list is ...read more
You have been given a 2-D array 'MAT' of size M x N where 'M' and 'N' denote the number of rows and columns, respectively. The elements of each row are sorted in non-decreasing order.
Moreo...read more
Software Engineer Trainee Interview Questions and Answers for Freshers
You’re given a slot machine with four slots where each slot will contain the color Red(R), Yellow(Y), Green(G), Blue(B), respectively. You don’t know the colors of this slot beforehand. You have to gue...read more
Q4. 1. Explain oops and its 4 pillars 2. Explain polymorphism with real life example ( tv or mobile phone) 3. Method overloading and overriding wrt mobile and told me to write class and show the example of both. 4....
read moreAnswering questions related to software engineering concepts and database management systems.
OOPs is a programming paradigm that focuses on objects and their interactions.
The four pillars of OOPs are encapsulation, inheritance, polymorphism, and abstraction.
Polymorphism allows objects of different types to be treated as objects of a common type.
Method overloading is having multiple methods with the same name but different parameters.
Method overriding is having a method in a s...read more
Given a Binary Tree with integer nodes, your task is to find the maximum level sum among all the levels in the Binary Tree. The sum of any level...read more
You are given an array consisting of 'N' elements and you need to perform 'Q' queries on the given array. Each query consists of an integer which tells the number of elements by which ...read more
Share interview questions and help millions of jobseekers 🌟
You are given a Singly Linked List of integers. You need to reverse the Linked List by changing the links between nodes.
Input Format :
The first line of input contains a single integer T, re...read more
You are given a singly Linked List of integers. Your task is to return true if the given singly linked list is a palindrome otherwise returns false.
For example:
The given linked list is 1...read more
Software Engineer Trainee Jobs
Q9. 1. What is oops concepts 2. Explain inheritance with example and how to prevent inheritance in Java?. 3. What is sealed, final, static keywords in Java 4. Implement Fibonacci, factorials, prime no. 5. Return al...
read moreThis interview question covers various topics in Java programming, including OOP concepts, inheritance, keywords, and implementing mathematical algorithms.
OOP concepts include encapsulation, inheritance, polymorphism, and abstraction.
Inheritance allows a class to inherit properties and methods from another class.
To prevent inheritance in Java, use the 'final' keyword before the class declaration.
Sealed, final, and static are keywords in Java with different functionalities.
Imp...read more
For a given integer array/list 'ARR' of size 'N' containing all distinct values, find the total number of 'Inversions' that may exist.
An inversion is defined for a pair of integers in the array...read more
Q11. Can we create two columns with same name in a relational table?
No, we cannot create two columns with the same name in a relational table.
Relational databases enforce uniqueness of column names within a table.
Having two columns with the same name would lead to ambiguity and confusion.
Column names are used to uniquely identify and access data in a table.
If two columns have the same name, it would be impossible to distinguish between them.
To avoid this, column names must be unique within a table.
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to return the list of all pairs of elements such that each sum of elements of each pair equals 'S'.
Note:
Each pair shou...read more
Write a program to find x to the power n (i.e., x^n). Take x and n from the user. You need to print the answer.
Note: For this question, you can assume that 0 raised to the power of 0 is 1...read more
Q14. if u brought a pen for 50rs and then u sold it for 60rs what is your percentage of profit or loss?
Bought a pen for 50rs and sold it for 60rs. What is the percentage of profit or loss?
Profit = Selling Price - Cost Price
Profit = 60 - 50 = 10
Profit Percentage = (Profit / Cost Price) * 100
Profit Percentage = (10 / 50) * 100 = 20%
Therefore, the percentage of profit is 20%
Q15. 1. What is OOPS concept? 2. What is difference between ARRAYS, STACKS,LINKED LISTS? 3. What are linear and non linear data structures? 4. They can ask you to code on some questions also.
Answers to common interview questions for Software Engineer Trainee position.
OOPS concept is a programming paradigm that focuses on objects and their interactions.
Arrays are a collection of elements of the same data type, while stacks and linked lists are dynamic data structures.
Linear data structures have a sequential order, while non-linear data structures do not.
Be prepared to code on some questions, practice coding problems beforehand.
Q16. your name in a database is repeated multiple number of types.To reduce it or to remove redundancy what do you do?
To remove redundancy in a database with repeated names, use normalization techniques.
Identify the primary key of the table and ensure it is unique
Create separate tables for related data to avoid repeating information
Use foreign keys to link related tables
Consider using indexing to improve performance
Update existing data to conform to the new structure
You are given an integer 'N'. For a given 'N' x 'N' chessboard, find a way to place 'N' queens such that no queen can attack any other queen on the chessboard.
A queen can be killed when it lies in the ...read more
Q18. What is Java? Features of Java? Ans-java is a high level programing language and it is platform independent. Java is a collection of objects It was developed by sun Microsystem.There are lot of application,webs...
read moreJava is a high-level, object-oriented programming language that is platform-independent and widely used for developing applications, websites, and games.
Developed by Sun Microsystems
Collection of objects
High performance and multi-threaded
Used for developing Android apps, enterprise applications, and web applications
Q19. Two complement of a number 1001 what is data structures?, types of data structures ? what is maching learning name diff methods used in machine learning basic Java concepts from OOPs as per my interview experie...
read moreThe question covers topics like two's complement, data structures, machine learning, and OOPs concepts in Java.
Two's complement of a number 1001 is -0111.
Data structures are ways of organizing and storing data in a computer so that it can be accessed and used efficiently. Examples include arrays, linked lists, stacks, queues, trees, and graphs.
Machine learning is a subset of artificial intelligence that involves training algorithms to make predictions or decisions based on da...read more
Q20. To convert a datatype into another what process is used?
Typecasting is used to convert one datatype into another.
Typecasting is the process of converting a value from one datatype to another.
It can be done implicitly or explicitly.
Implicit typecasting is done automatically by the compiler.
Explicit typecasting is done manually by the programmer using casting operators.
Examples of typecasting include converting an integer to a float, a string to an integer, etc.
How is an abstract class different from an interface?
Q22. what you mean by call by value and reference ,funtions.
Call by value and reference are two ways of passing arguments to functions.
Call by value passes a copy of the argument's value to the function.
Call by reference passes a reference to the argument's memory location to the function.
Functions that use call by value cannot modify the original value of the argument.
Functions that use call by reference can modify the original value of the argument.
In some programming languages, call by reference is achieved using pointers.
Example: ...read more
Q23. what is mean by stress and strain and what are its units?
Stress is the force applied to an object, while strain is the deformation caused by that force.
Stress is measured in units of force per unit area, such as pounds per square inch (psi) or newtons per square meter (N/m²).
Strain is a dimensionless quantity, typically expressed as a percentage or decimal, and is calculated as the change in length or shape divided by the original length or shape.
Stress and strain are related by a material's modulus of elasticity, which describes h...read more
Q24. how will you print any statement in python language?
To print a statement in Python, use the print() function.
Use the print() function followed by the statement you want to print.
Enclose the statement in quotes if it is a string.
You can also print variables or expressions by separating them with commas.
To print multiple statements on the same line, use the end parameter.
Q25. Which programming language are you comfortable with?
I am comfortable with Java and Python.
Proficient in Java and Python programming languages
Experience in developing web applications using Java frameworks like Spring and Hibernate
Familiar with Python libraries like NumPy and Pandas for data analysis
Comfortable with object-oriented programming concepts and design patterns
Q26. Develope "To Do List" full fledged Application with modern design including header footer and also implement functionality like 'Add' , 'Edit', 'Delete' and 'View List' within ½ hour of time span of Interview '...
read moreDevelop a 'To Do List' application with modern design and functionality like 'Add', 'Edit', 'Delete', and 'View List' within ½ hour.
Use HTML, CSS, and JavaScript for front-end development
Implement CRUD operations for tasks (Create, Read, Update, Delete)
Design a user-friendly interface with header and footer
Utilize localStorage or backend server for data storage
Q27. 2. Which programming language you are good in? 3. What are the pillars of OOP? Explain in deep. 4. SQL queries. 5. Easy level coding.
Answering questions related to programming languages, OOP, SQL queries, and easy level coding.
I am proficient in Java and Python.
The four pillars of OOP are encapsulation, inheritance, abstraction, and polymorphism.
SQL queries involve selecting, inserting, updating, and deleting data from a database.
I am comfortable with easy level coding challenges such as implementing basic algorithms or solving simple problems.
Q28. 1.What is primary foreign key 2. Explain ACID properties 3. Return 3 rd maximum salary 4. One SQL query on join 5. IN In SQL 6. Let var const in JS 7. what is proto in JS 8. Explain closure in JS
Answers to interview questions for Software Engineer Trainee
Primary foreign key is a column in a table that is used to link to the primary key of another table
ACID properties are Atomicity, Consistency, Isolation, and Durability which ensure database transactions are reliable
To return 3rd maximum salary, use the LIMIT and OFFSET clauses in SQL
SQL join is used to combine data from two or more tables based on a related column
IN in SQL is used to specify multiple values in a WHE...read more
Q29. 1. Give brief introduction. 2. Explain Encapsulation and implementation. 3. How to achieve inheritance? Write basic code. 4. Explain collection frameworks in Java.
Interview questions for Software Engineer Trainee position
Introduction should include name, education, and relevant experience
Encapsulation is a mechanism to hide data and methods from outside world
Inheritance is achieved by extending a class and using 'extends' keyword
Collection frameworks in Java provide classes and interfaces to store and manipulate groups of objects
Examples of collection frameworks include ArrayList, LinkedList, HashSet, and HashMap
Q30. What are Hooks in ReactJs and Explain useState, useRef, useEffect Hooks with their usecases?
Hooks are functions that allow us to use state and other React features in functional components.
useState is a hook that allows us to add state to functional components.
useRef is a hook that allows us to create a mutable reference that persists across renders.
useEffect is a hook that allows us to perform side effects in functional components.
useState example: const [count, setCount] = useState(0);
useRef example: const inputRef = useRef(null);
useEffect example: useEffect(() =>...read more
Q31. Introduce Your Self? Explain 4 Pillars of OOPS? Explain Different types of Normalization? Explain Heap Tree and Give Real world Example? Explain Quick and Merge Sort ? What is the Time Complexity of Quick and M...
read moreAnswers to questions asked in a Software Engineer Trainee interview
4 pillars of OOPS: Abstraction, Encapsulation, Inheritance, Polymorphism
Normalization types: 1NF, 2NF, 3NF, BCNF
Heap tree: complete binary tree, used in heap sort, priority queue
Quick sort: divide and conquer, worst case O(n^2), best case O(nlogn)
Merge sort: divide and conquer, always O(nlogn)
Join types: inner, outer, left, right
Class and constructor can be made private
Method is used to perform an action, cons...read more
What is meant by static polymorphism?
Q33. What are the differences between array list and array?
Array list is a dynamic array that can grow or shrink in size, while array has a fixed size.
Array list can dynamically resize itself, while array has a fixed size.
Array list is part of Java's Collection framework, while array is a basic data structure in most programming languages.
Array list allows insertion and deletion of elements at any position, while array does not support this flexibility.
What is the difference between overloading and overriding?
Q35. What is a database?
A database is a structured collection of data that is organized and stored for easy access, retrieval, and management.
A database is used to store and manage large amounts of data.
It provides a way to organize and structure data for efficient storage and retrieval.
Databases can be relational, object-oriented, or hierarchical, depending on the data model used.
Examples of databases include MySQL, Oracle, MongoDB, and SQLite.
Q36. Do you know anything about SLK. If yes what are those
SLK stands for Software Load and Performance Testing. It is a process of testing software applications to ensure their performance under expected load.
SLK is used to identify performance bottlenecks and optimize software applications.
It involves simulating real-world scenarios and measuring the response time and resource usage.
SLK helps in determining the maximum capacity of a software system and ensuring its stability.
Examples of SLK tools include JMeter, LoadRunner, and Gat...read more
Q37. Which search is better?linear or binary?and what are time complexities
Binary search is better for sorted arrays. Time complexity: Linear - O(n), Binary - O(log n).
Linear search is suitable for unsorted arrays.
Binary search is suitable for sorted arrays.
Linear search has a time complexity of O(n).
Binary search has a time complexity of O(log n).
Q38. Software process models? differentiating the waterfall model and the incremental model.
Waterfall model is a linear sequential approach, while incremental model divides the project into small increments.
Waterfall model follows a linear and sequential approach, where each phase must be completed before moving on to the next.
Incremental model divides the project into small increments, with each increment building upon the previous one.
Waterfall model is less flexible to changes, as requirements are finalized early in the process.
Incremental model allows for change...read more
What are Private and Special IP addresses?
What is meant by normalization and denormalization?
Find out the odd number out of given Number, derive the formula to find root of a quadratic equation.
Q42. program to find unique characters in a word like "BANANA"
A program to find unique characters in a word.
Create an empty array to store unique characters.
Loop through each character in the word.
If the character is not already in the array, add it.
Return the array of unique characters.
Q43. Write Typescript code from scratch of "Finding maximum length of palindromic substring from the given Strings". Do this question in ½ hour live coding interview.
Finding the maximum length of palindromic substring from an array of strings using Typescript.
Iterate through each string in the array
For each string, iterate through all possible substrings and check if it is a palindrome
Keep track of the maximum length palindrome found
Q44. heaps in java, how does internal memory allocation happen for heaps
In Java, heaps are used for dynamic memory allocation. Internal memory allocation in heaps is managed by the JVM.
Heaps in Java are used for storing objects and dynamically allocated memory.
Memory allocation in heaps is managed by the Java Virtual Machine (JVM).
The JVM uses a technique called garbage collection to reclaim memory from objects that are no longer in use.
Objects in the heap are allocated memory based on their size and type.
Example: When a new object is created in ...read more
Q45. How can you compose multiple HOCs with render props in a React component
Compose multiple HOCs with render props in a React component
Create a render prop component that accepts a function as a prop
Wrap the render prop component with HOCs
Pass the function as a prop to the HOCs
Use the function to render the component's content
Example: withAuth(withTheme(RenderPropComponent))
Q46. Use of object oriented programming?
Object oriented programming is a programming paradigm that uses objects to represent and manipulate data.
Encapsulation: bundling data and methods that operate on that data within one unit
Inheritance: creating new classes from existing ones, inheriting their properties and methods
Polymorphism: ability of objects to take on many forms and behave differently based on context
Examples: Java, C++, Python, Ruby
Q47. How do you store a credit card number in python data types tell me use case
Credit card numbers should be stored securely using encryption and hashing algorithms.
Use encryption and hashing algorithms to store credit card numbers securely
Never store the full credit card number, only store the last 4 digits for identification purposes
Use a secure database to store the credit card information
Implement strict access controls to limit who can access the credit card information
Q48. Why is java called the partial OOP concept?
Java is not called the partial OOP concept.
Java is a fully object-oriented programming language.
It supports all the principles of OOP such as encapsulation, inheritance, and polymorphism.
Java allows the creation of classes, objects, and methods to implement OOP concepts.
It provides features like abstraction and encapsulation to achieve data hiding and modularity.
Java also supports interfaces, which are a key component of OOP.
The misconception of Java being a partial OOP conce...read more
Q49. What is run-time polymorphism? what is SQL and RDBMS? What is the concept of inheritance and real time examples? code for a program to reverse a string
Run-time polymorphism is the ability of a method to do different things based on the object it is acting upon.
Run-time polymorphism is achieved through method overriding in Java.
It allows a subclass to provide a specific implementation of a method that is already provided by its superclass.
Example: Animal class has a method 'makeSound'. Dog and Cat classes can override this method to make different sounds.
Q50. What are Closures, Promises in JS?
Closures are functions that have access to variables from their outer scope. Promises are objects used for asynchronous programming in JavaScript.
Closures are created when a function is defined inside another function and the inner function has access to the outer function's variables.
Closures allow for data encapsulation and private variables in JavaScript.
Promises are used to handle asynchronous operations and provide a way to handle success or failure of those operations.
P...read more
Interview Questions of Similar Designations
Top Interview Questions for Software Engineer Trainee Related Skills
Interview experiences of popular companies
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month