SDE (Software Development Engineer)

10+ SDE (Software Development Engineer) Interview Questions and Answers for Freshers

Updated 15 Feb 2023

Popular Companies

search-icon

Q1. Given a binary search tree , print the path which has the sum equal to k and has minimum hops. i.e if there are multiple paths with the sum equal to k then print the path with minimum number of nodes

Ans.

Given a binary search tree, print the path with sum k and minimum hops.

  • Traverse the tree using DFS and keep track of the current path and its sum.

  • If the current sum equals k, compare the current path with the minimum path found so far.

  • If the current sum is greater than k, backtrack to the previous node and continue traversal.

  • If the current sum is less than k, continue traversal.

  • Return the minimum path found.

  • Time complexity: O(nlogn) for balanced tree, O(n^2) for skewed tree.

Q2. Print all the Elements not present in a sorted array and tell the time and space complexity of the algorithm.

Ans.

Print all elements not present in a sorted array with time and space complexity.

  • Iterate through array and print missing elements

  • Use binary search for faster search

  • Time complexity: O(n log n)

  • Space complexity: O(1)

Q3. Print all the elements not present in an unsorted array and tell the time and space complexity of the algorithm.

Ans.

Print all elements not present in an unsorted array and give time and space complexity.

  • Iterate through array and use a hashset to keep track of seen elements.

  • Print elements not in hashset.

  • Time complexity: O(n), Space complexity: O(n)

Q4. What's Agile methodology and it's advantages over waterfall model?

Ans.

Agile is an iterative approach to software development that emphasizes flexibility and customer satisfaction.

  • Agile involves breaking down projects into smaller, more manageable chunks called sprints.

  • It prioritizes collaboration between developers, customers, and stakeholders.

  • It allows for changes and adjustments to be made throughout the development process.

  • It promotes continuous delivery and improvement.

  • Advantages over waterfall model include faster time to market, increased...read more

Are these interview questions helpful?

Q5. Given two linked lists both represent a number . Create a linked list that contains its sum

Ans.

Create a linked list that contains the sum of two given linked lists representing numbers.

  • Traverse both linked lists simultaneously and add the corresponding nodes' values. If the sum is greater than 9, carry over the 1 to the next node.

  • If one linked list is longer than the other, add the remaining nodes to the sum.

  • Create a new linked list with the sum in reverse order.

Q6. Explain Waterfall model.It's advantages and disadvantages?

Ans.

Waterfall model is a linear sequential approach to software development.

  • Advantages: clear and well-defined stages, easy to understand and manage, suitable for small projects with stable requirements

  • Disadvantages: inflexible, difficult to make changes once a stage is completed, testing is done only at the end, not suitable for large or complex projects

  • Stages: requirements gathering, design, implementation, testing, deployment, maintenance

  • Example: building a house, where each s...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q7. Name different Software Development Models You know about?

Ans.

Different software development models

  • Waterfall model

  • Agile model

  • Spiral model

  • V-model

  • Iterative model

  • RAD model

  • Prototype model

  • Incremental model

Q8. Find and element in a rotated array

Ans.

Finding an element in a rotated array

  • Identify the pivot point where the array is rotated

  • Divide the array into two sub-arrays based on the pivot point

  • Perform binary search on the appropriate sub-array to find the element

  • Handle edge cases like when the element is at the pivot point

SDE (Software Development Engineer) Jobs

0

Q9. Explain SDLC(Software Development Life Cycle)?

Ans.

SDLC is a process followed by software development teams to design, develop and test high-quality software.

  • SDLC consists of several phases including planning, analysis, design, development, testing, deployment, and maintenance.

  • Each phase has its own set of deliverables and objectives.

  • SDLC models include Waterfall, Agile, and DevOps.

  • SDLC helps ensure that software is developed efficiently, on time, and within budget.

  • SDLC also helps ensure that software meets the needs of stake...read more

Q10. find unique character from a string and optimize it

Ans.

Find unique character from a string and optimize it

  • Use a hash table to store the frequency of each character in the string

  • Iterate through the hash table to find the character with frequency 1

  • If there are multiple characters with frequency 1, return the first one

  • Optimization: Stop iterating through the hash table once a character with frequency 1 is found

Q11. What is a database and explain it

Ans.

A database is a collection of organized data that can be easily accessed, managed, and updated.

  • A database stores data in tables with rows and columns

  • It allows for efficient data retrieval and manipulation

  • Examples include MySQL, Oracle, and MongoDB

Q12. Dictionaries in python

Ans.

Dictionaries are a built-in data type in Python used to store key-value pairs.

  • Keys must be unique and immutable.

  • Values can be of any data type.

  • Access values using keys.

  • Add or modify values using keys.

  • Use the 'in' keyword to check if a key exists in the dictionary.

  • Use the 'len()' function to get the number of key-value pairs in the dictionary.

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

Interview experiences of popular companies

3.7
 • 10k Interviews
3.7
 • 7.3k Interviews
4.1
 • 4.9k Interviews
4.0
 • 1.3k Interviews
4.4
 • 812 Interviews
4.3
 • 487 Interviews
3.9
 • 390 Interviews
3.4
 • 39 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

SDE (Software Development Engineer) 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