Software Engineer Intern
100+ Software Engineer Intern Interview Questions and Answers for Freshers
Q51. Explain your knowledge on databases and the work that you have done with them.
I have experience working with databases, including designing schemas, writing queries, and optimizing performance.
Designed database schemas for various projects
Written complex SQL queries to retrieve and manipulate data
Optimized database performance by indexing tables and tuning queries
Worked with relational databases like MySQL and PostgreSQL
Familiar with NoSQL databases like MongoDB
Q52. Define Abstraction 2 cubes puzzle Define laws of cn
Abstraction is the process of hiding complex implementation details and exposing only the necessary information.
Abstraction helps in reducing complexity and increasing efficiency.
It allows us to focus on the essential features of an object or system.
For example, a car's dashboard abstracts the complex workings of the car's engine and presents only the necessary information to the driver.
Q53. merge two sorted lists up to length k
Merge two sorted lists up to length k
Create a new list to store the merged result
Iterate through both lists up to length k, comparing elements and adding the smaller one to the new list
Handle cases where one list is shorter than k
Q54. What is AI, ML and deep learning
AI stands for Artificial Intelligence, ML stands for Machine Learning, and deep learning is a subset of ML that uses neural networks to model and solve complex problems.
AI is the simulation of human intelligence processes by machines, such as learning, reasoning, and self-correction.
ML is a subset of AI that focuses on the development of algorithms that can learn from and make predictions or decisions based on data.
Deep learning is a subset of ML that uses neural networks wit...read more
Q55. How do you deploy an application ?
Application deployment involves transferring code from development environment to production servers.
Choose a deployment method (e.g. manual, automated, continuous deployment)
Prepare the application for deployment by packaging it with necessary dependencies
Select a deployment environment (e.g. cloud, on-premises)
Transfer the packaged application to the deployment environment
Configure the deployment environment (e.g. set up databases, configure servers)
Run tests to ensure the ...read more
Q56. Why do we use neural networks ?
Neural networks are used for complex pattern recognition and decision-making tasks.
Neural networks can learn from data and make predictions without being explicitly programmed.
They are used in image and speech recognition, natural language processing, and autonomous vehicles.
Neural networks can handle non-linear relationships and complex patterns better than traditional algorithms.
They are used in recommendation systems, fraud detection, and financial forecasting.
Neural netwo...read more
Share interview questions and help millions of jobseekers 🌟
Q57. Binary Search in Sorted Rotated Array - Duplicates Present
Binary search in a sorted rotated array with duplicates present.
Perform a modified binary search by checking both ends of the array for duplicates
Handle cases where duplicates are present at the start, end, or middle of the array
Consider cases where the array is rotated multiple times
Q58. Binary Search in Sorted Rotated Array - No Duplicates
Binary search in a sorted rotated array with no duplicates.
Find the pivot point where the array is rotated.
Determine which half of the array to search based on the target value and pivot point.
Perform binary search in the selected half of the array.
Software Engineer Intern Jobs
Q59. in a sorted matrix of 0s and 1s, return the row with max 1s
Iterate through each row and count the number of 1s, return the row with the maximum count.
Iterate through each row of the matrix
Count the number of 1s in each row
Track the row with the maximum count of 1s
Q60. What is Virtual Memory?
Virtual memory is a memory management technique that allows a computer to compensate for physical memory shortages by temporarily transferring data from RAM to disk storage.
Virtual memory allows programs to use more memory than is physically available on the computer.
It helps in multitasking by allowing multiple programs to run simultaneously without running out of memory.
Virtual memory uses a combination of RAM and disk space to store data temporarily.
When a program needs mo...read more
Q61. Usage of Hashmaps and Dictionaries
Hashmaps and dictionaries are data structures used to store key-value pairs for efficient retrieval and storage.
Hashmaps and dictionaries are commonly used in programming to store and retrieve data based on a unique key.
They offer fast lookup times, typically O(1) on average, making them ideal for scenarios where quick access to data is required.
Examples of using hashmaps include storing user information with a unique user ID as the key, or mapping words to their frequencies ...read more
Q62. Connect databse to the frontend using springboot/hibernate
Use Spring Boot and Hibernate to connect database to frontend
Create a Spring Boot application with dependencies for Spring Data JPA and Hibernate
Define entity classes representing database tables and annotate them with @Entity
Create a repository interface extending JpaRepository to perform CRUD operations
Configure application.properties file with database connection details
Use Hibernate to automatically generate database schema based on entity classes
Q63. What does a Stored Procedure do
A stored procedure is a precompiled set of SQL statements that can be executed on a database server.
Stored procedures are used to encapsulate and execute complex database operations.
They can be used to improve performance by reducing network traffic.
Stored procedures can be parameterized and reused across multiple applications.
They provide a level of security by allowing access to the database only through the procedure.
Examples: Creating a stored procedure to insert data int...read more
Q64. What is an and gate using MOSFETs?
An AND gate using MOSFETs is a digital logic gate that outputs a high signal only when all input signals are high.
An AND gate using MOSFETs typically consists of multiple MOSFETs connected in series.
When all input signals are high, the output signal is high.
Examples of MOSFETs commonly used in AND gates include NMOS and PMOS transistors.
Q65. Reverse a python string using slicing or other methods
Use slicing to reverse a Python string
Use string slicing with a step of -1 to reverse the string
Example: 'hello'[::-1] will return 'olleh'
Q66. Missing number in array in 1 to n
Find the missing number in an array of integers from 1 to n.
Create a hash set to store the numbers in the array
Loop through the numbers from 1 to n and check if they are in the hash set
Return the number that is not in the hash set
Q67. Write code for Level Order Traversal for Binary Tree
Level Order Traversal for Binary Tree is a method to visit all nodes level by level starting from the root.
Use a queue data structure to keep track of nodes at each level
Start by pushing the root node into the queue
While the queue is not empty, dequeue a node, visit it, and enqueue its children
Q68. Code to write list creation in dsa and so many
Implement list creation in data structures and algorithms
Use an array to store the elements of the list
Implement functions to add, remove, and access elements in the list
Consider using a linked list for more efficient insertion and deletion operations
Q69. Difference between tuple and delete command
Tuple is a data structure that stores a fixed number of elements, while delete command is used to remove data from a database table.
Tuple is used to store multiple values in a single variable, while delete command is used to remove specific rows from a database table.
Tuples are immutable, meaning their values cannot be changed once they are set, while delete command permanently removes data from a table.
Example: Tuple (1, 'apple', 3.14) vs. DELETE FROM table_name WHERE condit...read more
Q70. Next Greater Element for Each Element in an Array
Find the next greater element for each element in an array.
Use a stack to keep track of elements without a next greater element.
Iterate through the array and compare elements with the top of the stack.
Update the stack with the current element if it is greater than the top element.
Q71. What is React.js? Why is React Used
React.js is a JavaScript library used for building user interfaces.
React allows developers to create reusable UI components.
It uses a virtual DOM for efficient rendering and updates.
React is often used in conjunction with other libraries and frameworks, such as Redux and Next.js.
It is widely used in web development for creating single-page applications and dynamic user interfaces.
React was developed by Facebook and is open-source.
Q72. LRU cache memory implementation using linked list
LRU cache memory can be implemented using a linked list to store and manage recently used items efficiently.
Use a doubly linked list to keep track of the order of items based on their usage.
When an item is accessed, move it to the front of the list to indicate it is the most recently used.
If the cache is full, remove the least recently used item from the end of the list.
Maintain a hashmap for quick access to items in the linked list.
Q73. Topological Sort along with dry run
Topological Sort is a linear ordering of vertices in a directed acyclic graph.
It is used to find a linear ordering of elements that have dependencies.
It is based on the concept of DFS (Depth First Search).
It can be implemented using both DFS and BFS (Breadth First Search).
It is commonly used in scheduling jobs, resolving dependencies, and compiling code.
Example: Topological sorting of courses to take in a college based on prerequisites.
Q74. array rotation by d places in the given array
Rotate array by d places
Create a temporary array to store elements to be rotated
Shift elements in the original array to the left by d places
Copy elements from the temporary array to the original array at the end
Q75. Print 1000 first rows in sql using the id column
Use SQL query to print the first 1000 rows using the id column
Use SELECT statement to retrieve data from the table
Use ORDER BY clause to sort the data by id column
Limit the result set to 1000 rows using LIMIT clause
Q76. Design a 2 player chess game
A 2 player chess game with standard rules and GUI
Implement standard chess rules and moves
Create a GUI for players to interact with the game
Allow players to make moves and track game progress
Incorporate checkmate and stalemate conditions
Implement a timer for each player's turn
Q77. Android Development Past projects
Developed an Android app for tracking daily expenses
Used Java and Android Studio for development
Implemented SQLite database for storing data
Included charts and graphs for visual representation of expenses
Q78. Difference between left join and right join
Left join includes all records from the left table and matching records from the right table, while right join includes all records from the right table and matching records from the left table.
Left join keeps all records from the left table, even if there are no matches in the right table.
Right join keeps all records from the right table, even if there are no matches in the left table.
Example: If we have a table of employees and a table of departments, a left join will inclu...read more
Q79. Sql query on 2nd highest salary
Use SQL query with ORDER BY and LIMIT to find the 2nd highest salary.
Use ORDER BY clause to sort salaries in descending order
Use LIMIT 1,1 to skip the first highest salary and get the second highest salary
Q80. Minimum element in stack in O(1) space
To find the minimum element in a stack in O(1) space, use an auxiliary stack to keep track of the minimum element at each step.
Create an auxiliary stack to store the minimum element at each step.
When pushing an element onto the main stack, compare it with the top element of the auxiliary stack and push the smaller one onto the auxiliary stack.
When popping an element from the main stack, also pop the top element from the auxiliary stack.
To get the minimum element, simply retur...read more
Q81. Difference between SSMS, SSIS and SSAS
SSMS is a management tool for SQL Server, SSIS is an ETL tool, and SSAS is a BI tool for analyzing data.
SSMS (SQL Server Management Studio) is a graphical management tool for SQL Server.
SSIS (SQL Server Integration Services) is an ETL (Extract, Transform, Load) tool used for data integration and workflow applications.
SSAS (SQL Server Analysis Services) is a BI (Business Intelligence) tool used for analyzing and reporting data.
SSMS is used for managing databases, creating and ...read more
Q82. How does Google search work?
Google search works by crawling and indexing web pages, and then ranking them based on relevance and quality.
Google uses web crawlers to discover and index web pages.
The search algorithm ranks pages based on relevance to the search query.
Factors like keywords, backlinks, and user experience influence rankings.
Google constantly updates its algorithm to improve search results.
Google also considers user location and search history for personalized results.
Q83. Sort a stack using a stack
Sort a stack using another stack
Create an empty temporary stack
Pop elements from the original stack and push them onto the temporary stack in sorted order
Pop elements from the temporary stack back to the original stack
Q84. What is F1 score?
F1 score is a measure of a test's accuracy that considers both the precision and recall of the test.
F1 score is the harmonic mean of precision and recall.
It is calculated using the formula: 2 * (precision * recall) / (precision + recall)
F1 score ranges from 0 to 1, where 1 is the best possible score.
It is commonly used in binary classification tasks.
Q85. What is polling ?
Polling is a technique used to continuously check the status of a resource or process.
Polling involves sending out periodic requests to check for updates or changes.
It is commonly used in software development to monitor changes in data or resources.
Polling can be synchronous or asynchronous, depending on the implementation.
Examples of polling include checking for new emails in an inbox or updating a live chat feed.
Q86. Time complexity of bubble sort algorithm
Bubble sort has a time complexity of O(n^2) in the worst case scenario.
Bubble sort compares adjacent elements and swaps them if they are in the wrong order.
It continues to iterate through the array until no more swaps are needed.
The worst case time complexity of bubble sort is O(n^2) where n is the number of elements in the array.
Example: If we have an array of 5 elements, bubble sort would take 25 comparisons in the worst case.
Q87. bfs traversal with dfs traversal
BFS and DFS are traversal algorithms used in graph theory to visit all nodes in a graph.
BFS (Breadth-First Search) visits nodes level by level, while DFS (Depth-First Search) goes as deep as possible before backtracking.
BFS uses a queue data structure, while DFS uses a stack or recursion.
Example: BFS traversal of a graph starting from node A: A -> B -> C -> D -> E
Example: DFS traversal of a graph starting from node A: A -> B -> D -> E -> C
Q88. find leaf node of binary tree
To find leaf node of binary tree, traverse the tree and check if node has no children.
Traverse the binary tree using depth-first search or breadth-first search
Check if a node has no left or right child, then it is a leaf node
Repeat the process for all nodes until all leaf nodes are found
Q89. Implementation of trees ,stacks .
Trees and stacks are fundamental data structures used in software engineering for organizing and storing data efficiently.
Trees are hierarchical data structures with nodes connected by edges. Examples include binary trees, AVL trees, and B-trees.
Stacks are linear data structures that follow the Last In First Out (LIFO) principle. Examples include function call stack and undo/redo stack.
Q90. Algorithm Explanation and Use Case
Explanation of algorithms and their use cases
Algorithms are step-by-step procedures for solving problems
Common algorithms include sorting, searching, and graph traversal
Use cases include optimizing resource allocation, data analysis, and machine learning
Q91. Git Hub Project and Explanation
GitHub is a platform for version control and collaboration on software projects.
GitHub allows developers to track changes in their codebase over time.
It enables collaboration among team members by providing tools for code review, issue tracking, and project management.
Developers can contribute to open source projects by forking repositories, making changes, and submitting pull requests.
GitHub also offers features like wikis, project boards, and actions for automating workflow...read more
Q92. what is list and tuple
List and tuple are data structures in Python. List is mutable and tuple is immutable.
List is a collection of items that are ordered and changeable.
Tuple is a collection of items that are ordered and unchangeable.
List uses square brackets [] while tuple uses parentheses ().
Example of list: ['apple', 'banana', 'cherry']
Example of tuple: ('apple', 'banana', 'cherry')
Q93. Reverse String without using inbuilt
Reverse a string without using inbuilt functions
Create a new array to store the reversed string
Iterate through the original string from end to start and append each character to the new array
Join the characters in the new array to form the reversed string
Q94. Reverse words in a sentence
Reverse words in a sentence
Split the sentence into an array of words
Iterate through the array in reverse order and append each word to a new array
Join the reversed words array back into a sentence
Q95. Convert numbers into roman numerals
Convert numbers into roman numerals using a simple algorithm
Create a mapping of numbers to roman numerals
Iterate through the mapping in descending order of values
Subtract the largest possible value from the input number and append the corresponding roman numeral to the result
Q96. difference between c++ and python
C++ is a statically typed language with a focus on performance and low-level memory manipulation, while Python is dynamically typed and emphasizes readability and simplicity.
C++ is statically typed, while Python is dynamically typed
C++ is compiled, while Python is interpreted
C++ is faster and more memory efficient, while Python is slower but easier to write and read
C++ allows for low-level memory manipulation, while Python abstracts memory management
C++ is commonly used for s...read more
Q97. Explain the principles of OOP
OOP is a programming paradigm based on the concept of objects, which can contain data in the form of fields and code in the form of procedures.
Encapsulation: Bundling data and methods that operate on the data into a single unit (object).
Inheritance: Allows a class to inherit properties and behavior from another class.
Polymorphism: Ability to present the same interface for different data types.
Abstraction: Hides the complex implementation details and only shows the necessary f...read more
Q98. Reverse the linkedlist
Reverse a linked list
Iterate through the linked list and reverse the pointers
Use three pointers to keep track of current, previous, and next nodes
Update the next pointer of each node to point to the previous node
Q99. Java programming experience
I have experience with Java programming through coursework and personal projects.
Completed multiple Java programming assignments in university courses
Developed a simple Java application for a personal project
Familiar with object-oriented programming concepts in Java
Q100. What is git & gihub
Git is a version control system that tracks changes in code, while GitHub is a platform for hosting and collaborating on code repositories.
Git is a distributed version control system used to track changes in code
GitHub is a web-based platform for hosting Git repositories and collaborating on code with others
Git allows for branching, merging, and reverting changes in code
GitHub provides features like pull requests, issues, and project management tools
Example: Developers use Gi...read more
Interview Questions of Similar Designations
Top Interview Questions for Software Engineer Intern 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