Software Engineer Level 1

50+ Software Engineer Level 1 Interview Questions and Answers

Updated 10 Dec 2024

Popular Companies

search-icon

Q1. Input a file. Select first 3 lines of the file. Select the longest line and count the number of words in that line. It was easy. I used Java methods to solve the problem. I explained the logic and he accepted i...

read more
Ans.

The program reads a file and selects the first 3 lines. It then identifies the longest line and counts the number of words in that line.

  • Read the file using appropriate file handling methods

  • Store the first 3 lines in an array of strings

  • Iterate through the array to find the longest line

  • Count the number of words in the longest line using string manipulation methods

Q2. But amazon can do the search in O(n). Why it has to go for O(nk)? For data structures like Hash tables and for large data, n will be large. So O(nk) is better than O(n) (former n is smaller than latter n).

Ans.

O(nk) is better than O(n) for large data and hash tables.

  • O(nk) is better because it takes into account the size of the data and the number of keys.

  • For large data and hash tables, the size of n will be large, making O(nk) more efficient.

  • O(n) assumes a constant number of keys, which may not be the case in practice.

  • Amazon may have chosen O(nk) for better scalability and performance.

Software Engineer Level 1 Interview Questions and Answers for Freshers

illustration image

Q3. When you search for a particular product in amazon, it displays some of the search results. But, only few particular products which are available in amazon are displayed, not all. How does this happen? I told M...

read more
Ans.

Amazon displays only a subset of search results based on various factors like relevance, popularity, and user preferences.

  • Amazon uses algorithms to determine which products to display in search results.

  • Factors considered include product relevance, customer reviews, sales rank, and availability.

  • Machine learning techniques may be used to personalize search results based on user behavior and preferences.

  • Amazon also considers factors like seller reputation and fulfillment options...read more

Q4. There exists a 3x3 matrix, start from the first element reach the last element of the matrix, between each edges there exists a weight. Reach the destination such that the sum of weights should be small. It was...

read more
Ans.

The question is about finding the shortest path in a 3x3 matrix with weighted edges.

  • This is a graph traversal problem.

  • Use a graph algorithm like Dijkstra's algorithm or A* search to find the shortest path.

  • Assign weights to the edges and calculate the sum of weights for each possible path.

  • Choose the path with the smallest sum of weights as the shortest path.

Are these interview questions helpful?

Q5. 1. Abstraction Vs Interface 2. Sealed class 3. why do we use a private constructor 4. Types of constructor 5. Encapsulation 6. Polymorphism 7. Virtual override keywords 8. CTE Table 9. Joins, Index, a procedure...

read more
Ans.

Technical interview questions for a Software Engineer I position

  • Abstraction is the process of hiding implementation details while interface defines a contract for the behavior of a class

  • Sealed class is a class that cannot be inherited

  • Private constructor is used to prevent the creation of instances of a class from outside the class

  • Types of constructor include default, parameterized, copy, and static

  • Encapsulation is the process of hiding implementation details and providing acc...read more

Q6. What will be the key and what will be the values? The product will be the key. The brands will be the values.

Ans.

The product will be the key and the brands will be the values.

  • The key in this case refers to the unique identifier for each product.

  • The values are the different brands associated with each product.

  • For example, if the product is a smartphone, the key could be the model number and the values could be the different brands that manufacture that model.

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q7. Do you know Radix Sort? Where it is used? Radix sort can be applied in amazon.

Ans.

Radix sort is a sorting algorithm that sorts integers by processing individual digits from least significant to most significant.

  • Radix sort is a non-comparative sorting algorithm.

  • It sorts numbers by grouping them based on each digit's value.

  • It is commonly used for sorting strings in lexicographic order.

  • Radix sort has linear time complexity, making it efficient for large datasets.

Q8. What data structure do they use? Hash tables.

Ans.

Hash tables are a data structure that uses a hash function to map keys to values, providing efficient lookup, insertion, and deletion.

  • Hash tables use a hash function to convert keys into array indices.

  • They provide constant-time average case complexity for search, insert, and delete operations.

  • Collisions can occur when different keys map to the same index, which can be resolved using techniques like chaining or open addressing.

  • Examples of hash table implementations include Pyt...read more

Software Engineer Level 1 Jobs

Software Engineer I - Servicing Apps (L08) 0-2 years
Synchrony International Services
4.4
Hyderabad / Secunderabad
Software Engineer I 9-11 years
Duck Creek Technologies
4.5
Remote
Software Engineer I 2-7 years
JPMorgan Chase
4.1
Mumbai

Q9. Application of Fibonacci series in day-to-day life.

Ans.

The Fibonacci series can be applied in day-to-day life for various purposes.

  • Financial planning: Fibonacci numbers can be used to calculate investment growth and determine optimal investment strategies.

  • Architecture and design: Fibonacci ratios can be used to create aesthetically pleasing designs and layouts.

  • Nature and biology: Fibonacci patterns can be observed in the growth of plants, arrangement of leaves, and formation of shells.

  • Music and art: Fibonacci sequences can be use...read more

Q10. Intersection of two Linked List Scheduling Algorithms in OS Multithreading in OS OOPS 2nd highest salary of employee SQL

Ans.

Intersection of two linked lists is finding the common node(s) between them.

  • Traverse both lists simultaneously and compare each node to find the intersection point.

  • Use a hash set to store nodes of one list and check for intersection in the other list.

  • Optimize by finding the lengths of both lists and aligning the pointers before comparison.

Q11. What is React ? What is NPM? Why have you used it in your project

Ans.

React is a JavaScript library for building user interfaces. NPM is a package manager for JavaScript.

  • React is used for creating interactive UI components

  • NPM is used for managing dependencies and packages in JavaScript projects

  • I used React in my project for its component-based architecture and virtual DOM efficiency

  • I used NPM in my project to easily install and manage third-party libraries and tools

Q12. Describe the procedure from scratch to create a spring boot backend service from database connection to client response

Ans.

Creating a Spring Boot backend service from scratch involves setting up database connection, creating entities, repositories, services, controllers, and handling client requests.

  • Set up database connection in application.properties file

  • Create entity classes representing database tables

  • Create repository interfaces extending JpaRepository for database operations

  • Create service classes to implement business logic

  • Create controller classes to handle client requests and map them to a...read more

Q13. Stack implementation with additional method/function that will always return minimum number present in stack

Ans.

Implement a stack with a method to return the minimum number in O(1) time complexity

  • Create a stack to store numbers and another stack to store minimum numbers encountered so far

  • When pushing a number, check if it is smaller than the current minimum and push it to the minimum stack

  • When popping a number, check if it is the current minimum and pop from the minimum stack if necessary

  • The top of the minimum stack will always have the current minimum number

Q14. Given a sorted and rotated array arr[] of size N and a key, the task is to find the key in the array. Input : arr[] = {5, 6, 7, 8, 9, 10, 1, 2, 3}, key = 3 Solution log(n)

Ans.

Use binary search to find the key in a sorted and rotated array.

  • Apply binary search to efficiently find the key in the array.

  • Check if the key is in the left or right half of the array based on the mid element.

  • Adjust the search space accordingly based on the comparison of key with elements at start, mid, and end of the array.

Q15. Running time of Radix sort? O(nk)

Ans.

Radix sort has a running time of O(nk), where n is the number of elements and k is the length of the longest element.

  • Radix sort is a non-comparative sorting algorithm that sorts elements by their individual digits or characters.

  • It works by distributing the elements into 10 buckets based on the value of the least significant digit, then repeatedly redistributing them based on the next significant digit.

  • The process continues until all digits have been considered, resulting in a...read more

Q16. Maximum area rectangle with all boundaries as 1 in a matrix of 0 and 1

Ans.

Find the maximum area rectangle with all boundaries as 1 in a matrix of 0 and 1.

  • Use dynamic programming to calculate the maximum area rectangle.

  • Iterate through each row of the matrix and calculate the maximum area rectangle with that row as the base.

  • Keep track of the maximum area rectangle seen so far.

  • Time complexity: O(n^2), where n is the number of rows in the matrix.

Q17. What is the differences between Java and Python?

Ans.

Java is statically typed, object-oriented language with a focus on performance and scalability. Python is dynamically typed, high-level language known for its simplicity and readability.

  • Java is statically typed, meaning variable types are explicitly declared at compile time. Python is dynamically typed, allowing for more flexibility but potentially leading to runtime errors.

  • Java is more verbose and requires more boilerplate code compared to Python, which emphasizes readabilit...read more

Q18. Write a program to check if a given string can become palindrome if letters are re-arranged

Ans.

Program to check if a string can be rearranged to form a palindrome

  • Create a frequency map of characters in the string

  • Count the number of characters with odd frequencies

  • If there is at most one character with odd frequency, the string can be rearranged to form a palindrome

Q19. Write SQL query to find 2nd largest Number from DB?

Ans.

Use a subquery to find the 2nd largest number in a database table.

  • Use a subquery to select all distinct numbers from the table

  • Order the numbers in descending order

  • Use LIMIT 1,1 to select the second row which will be the 2nd largest number

Q20. What are the storage Class Specifiers in C ?

Ans.

Storage class specifiers in C define the scope and lifetime of variables.

  • auto - default storage class for local variables

  • extern - used to declare a global variable in another file

  • static - retains the value of a variable between function calls

  • register - suggests to the compiler to store the variable in a register for faster access

Q21. 3 programming experience with intermediate difficult level

Ans.

I have intermediate level experience in programming with Java, Python, and C++.

  • I have worked on projects involving data structures and algorithms.

  • I have experience with object-oriented programming and design patterns.

  • I have developed web applications using frameworks like Spring and Django.

  • I have also worked on projects involving machine learning and natural language processing.

  • I am comfortable working with databases and have experience with SQL and NoSQL databases.

Q22. Longest Alternating Sequence increasing then decreasing then increasing

Ans.

Find the longest alternating sequence of increasing, decreasing, and increasing numbers.

  • Iterate through the array and keep track of the current sequence length and direction.

  • If the direction changes, update the sequence length and reset the direction.

  • Return the longest sequence length found.

  • Example: [1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1] returns 7 (1, 2, 3, 2, 1, 2, 3).

Q23. How can you optimise memory in your project

Ans.

Memory optimisation can be achieved by reducing memory usage, improving data structures, and implementing efficient algorithms.

  • Use data structures that require less memory, such as arrays instead of lists

  • Avoid memory leaks by properly managing memory allocation and deallocation

  • Implement caching mechanisms to reduce the need for frequent memory access

  • Optimise algorithms to reduce unnecessary memory usage, such as using dynamic programming

Q24. What is diamond problem in Java?

Ans.

Diamond problem in Java occurs when a class inherits from two classes that have a common ancestor, resulting in ambiguity.

  • Occurs in multiple inheritance when a class inherits from two classes that have a common ancestor

  • Results in ambiguity as the compiler cannot determine which method to call

  • Can be resolved using interfaces or by explicitly overriding methods

Q25. Program to Find Length of String with custom function

Ans.

Program to find length of string using custom function

  • Create a custom function that takes an array of strings as input

  • Iterate through each string in the array and calculate its length

  • Return the lengths of all strings in an array

Q26. Explain inheritance, its types and examples

Ans.

Inheritance is a concept in object-oriented programming where a class inherits attributes and methods from another class.

  • Types of inheritance: single inheritance, multiple inheritance, multilevel inheritance, hierarchical inheritance

  • Examples: Animal class can be inherited by Dog and Cat classes, Vehicle class can be inherited by Car and Bike classes

Q27. Sum of consecutive numbers in circular linked list

Ans.

To find the sum of consecutive numbers in a circular linked list, iterate through the list and keep track of the sum.

  • Iterate through the circular linked list starting from a given node

  • Keep track of the sum of consecutive numbers as you traverse the list

  • Handle the case when the list loops back to the starting node

Q28. SQL Joins and types of sql statements

Ans.

SQL Joins are used to combine data from multiple tables. There are four types of SQL statements: SELECT, INSERT, UPDATE, and DELETE.

  • SQL Joins are used to combine data from two or more tables based on a related column between them.

  • The four types of SQL statements are SELECT, INSERT, UPDATE, and DELETE.

  • SELECT is used to retrieve data from one or more tables.

  • INSERT is used to add new data to a table.

  • UPDATE is used to modify existing data in a table.

  • DELETE is used to remove data ...read more

Q29. Write a program about even and odd numbers.

Ans.

A program to determine if a number is even or odd.

  • Use the modulo operator (%) to check if a number is divisible by 2.

  • If the remainder is 0, the number is even. Otherwise, it is odd.

  • Example: 4 % 2 = 0 (even), 5 % 2 = 1 (odd)

Q30. What are the different http methods

Ans.

HTTP methods are used to indicate the desired action to be performed on a resource.

  • GET - Retrieve data from a server

  • POST - Submit data to a server

  • PUT - Update an existing resource on a server

  • DELETE - Remove a resource from a server

  • PATCH - Partially update a resource on a server

  • OPTIONS - Get information about the communication options available for a resource

Q31. Different Data types in Python ?

Ans.

Python supports various data types including integers, floats, strings, lists, tuples, dictionaries, and more.

  • Integers: whole numbers without decimal points (e.g. 5, -3)

  • Floats: numbers with decimal points (e.g. 3.14, -0.5)

  • Strings: sequences of characters enclosed in quotes (e.g. 'hello', '123')

  • Lists: ordered collections of items (e.g. [1, 'apple', True])

  • Tuples: ordered, immutable collections of items (e.g. (1, 'banana', False))

  • Dictionaries: unordered collections of key-value ...read more

Q32. What is Normalization ?

Ans.

Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.

  • Normalization is used to eliminate data redundancy by dividing the database into multiple tables and defining relationships between them.

  • It helps in reducing data anomalies such as insertion, update, and deletion anomalies.

  • Normalization is achieved through a series of stages called normal forms (1NF, 2NF, 3NF, BCNF, etc.).

  • For example, in a database of students and cou...read more

Frequently asked in, ,

Q33. Explain how multithreading works?

Ans.

Multithreading allows multiple threads to run concurrently within a single process, improving performance and responsiveness.

  • Multithreading allows for parallel execution of tasks within a single process.

  • Threads share the same memory space, allowing for efficient communication and data sharing.

  • Thread management is handled by the operating system, which schedules threads for execution.

  • Examples of multithreading include web servers handling multiple client requests simultaneousl...read more

Q34. Right view and bottom view of tree.

Ans.

The right view of a tree shows the rightmost node at each level, while the bottom view shows the bottommost node at each horizontal distance.

  • To find the right view, perform a level order traversal and keep track of the rightmost node at each level.

  • To find the bottom view, perform a vertical order traversal and keep track of the bottommost node at each horizontal distance.

  • Both views can be represented as arrays of strings, where each string represents the value of a node.

Q35. Complete oops concepts with examples?

Ans.

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.

  • OOP focuses on creating objects that interact with each other to solve problems.

  • Key concepts include encapsulation, inheritance, and polymorphism.

  • Encapsulation involves bundling data and methods that operate on the data into a single unit.

  • Inheritance allows classes to inherit attributes and methods from other classes.

  • Polymorphism allow...read more

Q36. What is empty class in Java

Ans.

An empty class in Java is a class that does not have any member variables or methods.

  • An empty class can be defined like this: class EmptyClass {}

  • Empty classes are often used as placeholders or markers in code.

  • Even though an empty class does not have any explicit members, it still inherits from the Object class in Java.

Q37. Explain polymorphism with examples

Ans.

Polymorphism is the ability of a single function or method to operate on different types of data.

  • Polymorphism allows objects of different classes to be treated as objects of a common superclass.

  • There are two types of polymorphism: compile-time (method overloading) and runtime (method overriding).

  • Example of compile-time polymorphism: function overloading where multiple functions have the same name but different parameters.

  • Example of runtime polymorphism: method overriding wher...read more

Q38. Write a code in C to reverse an array

Ans.

Code in C to reverse an array of strings

  • Use two pointers, one pointing to the start of the array and the other pointing to the end

  • Swap the elements at the two pointers and move them towards each other until they meet in the middle

Q39. Coding problem and the logic behind it

Ans.

Implement a function to reverse a string

  • Create a new empty string to store the reversed string

  • Iterate through the original string from the end to the beginning and append each character to the new string

  • Return the new reversed string

Q40. 1. BFS travel of binary tree.

Ans.

BFS travel of binary tree

  • BFS stands for Breadth First Search

  • It is a traversal algorithm for trees and graphs

  • In BFS, we visit all the nodes at the same level before moving to the next level

  • We use a queue data structure to implement BFS

  • Example: BFS traversal of a binary tree with root node A would be A, B, C, D, E, F, G, H, I

Q41. Minimum number of runways required

Ans.

The minimum number of runways required depends on the number of aircrafts and their arrival and departure times.

  • Consider the number of aircrafts that will be arriving and departing at the same time.

  • Calculate the maximum number of aircrafts that will be on the ground at any given time.

  • Each aircraft requires a separate runway for landing and takeoff.

  • The minimum number of runways required is equal to the maximum number of aircrafts on the ground at any given time.

Q42. Implement Book reader System

Ans.

Book reader system implementation

  • Design a user interface for browsing and selecting books

  • Implement a database to store book information and user data

  • Develop a feature for bookmarking and saving progress

  • Include options for adjusting font size and background color

  • Integrate with payment system for purchasing books

Q43. 2. Maximum path sum in matrix

Ans.

Find the maximum sum of a path in a matrix from top left to bottom right corner.

  • Use dynamic programming to calculate the maximum sum of a path ending at each cell.

  • The maximum sum of a path ending at cell (i,j) is the maximum of the maximum sums of paths ending at (i-1,j) and (i,j-1), plus the value of cell (i,j).

  • The maximum sum of a path from top left to bottom right corner is the maximum sum of a path ending at the bottom right corner.

  • Time complexity: O(n^2), space complexit...read more

Q44. What are oops concepts

Ans.

Object-oriented programming concepts that focus on data abstraction, encapsulation, inheritance, and polymorphism.

  • Abstraction: Hiding complex implementation details and showing only necessary features.

  • Encapsulation: Binding data and methods that operate on the data into a single unit.

  • Inheritance: Creating new classes from existing classes to reuse code and extend functionality.

  • Polymorphism: Objects of different classes can be treated as objects of a common superclass.

  • Example:...read more

Frequently asked in, ,

Q45. Matrix rotate by 180 degrees?

Ans.

Rotate a 2D matrix by 180 degrees in place without using extra space.

  • Iterate through the matrix and swap elements symmetrically across the center row.

  • Use two pointers, one starting from the first row and the other from the last row, to swap elements.

  • Repeat the swapping process for each row until the entire matrix is rotated.

  • Example: Input matrix = [[1,2,3],[4,5,6],[7,8,9]], Output matrix = [[9,8,7],[6,5,4],[3,2,1]]

Q46. Multithreading with example?

Ans.

Multithreading is the ability of a CPU to execute multiple threads concurrently, allowing for improved performance and responsiveness.

  • Multithreading allows multiple tasks to be executed simultaneously on a single CPU core.

  • Each thread has its own program counter, stack, and set of registers.

  • Example: A web browser using multithreading to load a webpage while simultaneously downloading images in the background.

Q47. SQL query and sorting algorithm

Ans.

SQL query to retrieve data from a database and sorting algorithm to organize the data

  • Use SELECT statement in SQL to retrieve data from a specific table

  • Use ORDER BY clause in SQL to sort the retrieved data based on a specific column

  • Implement a sorting algorithm like Bubble Sort, Quick Sort, or Merge Sort in a programming language to organize data

Q48. What is my expected CTC

Ans.

Expected CTC for Software Engineer Level 1 depends on company, location, experience, and negotiation skills.

  • Expected CTC can vary based on company policies and budget.

  • Location plays a significant role in determining CTC due to cost of living differences.

  • Experience level can impact the salary offered, with more experienced candidates typically receiving higher CTC.

  • Negotiation skills can also influence the final CTC offered by the company.

  • For example, a Software Engineer Level ...read more

Q49. Longest Increasing Sequence

Ans.

Find the length of the longest increasing subsequence in an array.

  • Use dynamic programming to solve the problem efficiently.

  • Maintain an array to store the length of longest increasing subsequence ending at each index.

  • Traverse the array and update the array for each index.

  • Return the maximum value in the array as the length of the longest increasing subsequence.

Q50. Reverse linked list using recursion

Ans.

Reverse a linked list using recursion

  • Create a recursive function to reverse the linked list

  • Pass the head of the linked list to the function

  • Base case: if the current node is null, return null

  • Recursive case: reverse the rest of the list and point the next node's next to the current node

1
2
Next
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions for Software Engineer Level 1 Related Skills

Interview experiences of popular companies

3.6
 • 2.3k Interviews
4.0
 • 481 Interviews
3.9
 • 463 Interviews
3.9
 • 201 Interviews
3.7
 • 157 Interviews
2.0
 • 90 Interviews
3.6
 • 83 Interviews
4.2
 • 13 Interviews
View all

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

Software Engineer Level 1 Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter