Sde1
10+ Sde1 Interview Questions and Answers for Freshers
Popular Companies
Q1. 1.What is Rdbms? 2.What is polymorphism and inheritance? 3.What is trigger? 4.Difference between span tag and div tag?
RDBMS is a relational database management system. Polymorphism and inheritance are OOP concepts. Triggers are database objects. Span and div tags are HTML elements.
RDBMS stands for Relational Database Management System, used to store and manage data in a structured format.
Polymorphism allows objects to be treated as instances of their parent class. Inheritance allows a class to inherit properties and behaviors from another class.
Triggers are database objects that are automati...read more
Q2. Write a factorial program and explain it and define class syantax
Factorial program using class syntax explained with examples.
Factorial is the product of all positive integers up to a given number.
Class syntax is used to define a blueprint for creating objects.
Example: class Factorial { def fact(n): return 1 if n == 0 else n * fact(n-1) }
Example: f = Factorial(); print(f.fact(5)) # Output: 120
Q3. Difference between heap and stack and how memory clean up is done?
Heap and stack are two different memory regions in a computer's memory. Heap is used for dynamic memory allocation, while stack is used for static memory allocation.
Heap is used for dynamic memory allocation, while stack is used for static memory allocation.
Heap memory is allocated at runtime and can be accessed randomly, while stack memory is allocated at compile time and accessed in a last-in-first-out manner.
Memory clean up in heap is done manually by the programmer using ...read more
Q4. maximum product of 2 numbers from given array
Find the maximum product of 2 numbers from a given array.
Sort the array and multiply the last two elements for positive numbers.
If there are negative numbers, multiply the two smallest negative numbers with the largest positive number.
Handle edge cases like array length less than 2 or all negative numbers.
Q5. If bully happens will you bully someone
No, I believe in standing up against bullying and supporting those who are being bullied.
I do not support bullying in any form and believe in treating others with respect and kindness.
I would try to intervene and help the person being bullied, either by talking to the bully or seeking help from a teacher or supervisor.
I believe in creating a positive and inclusive environment where everyone feels safe and respected.
Q6. NextGreater element in array using Stack(can find on leetcode)
Using a stack to find the next greater element in an array of strings.
Iterate through the array from right to left.
Push elements onto the stack and compare with the top element to find the next greater element.
Pop elements from the stack until a greater element is found or stack is empty.
Share interview questions and help millions of jobseekers 🌟
Q7. Why SDE 1 only not SDE 2
SDE 1 is an entry-level position where candidates gain foundational skills before advancing to SDE 2.
SDE 1 focuses on learning and building foundational skills in software development.
SDE 2 requires more experience and expertise in software development.
Advancing from SDE 1 to SDE 2 is a common career progression in tech companies.
SDE 1 roles often involve working on smaller projects or components of larger projects.
SDE 2 roles typically involve leading larger projects or team...read more
Q8. Implementing a feature in REACT
Implementing a feature in REACT
Identify the feature requirements and design the component structure
Write the necessary JSX code to create the feature
Implement state management using React hooks or Redux if needed
Handle user interactions and update the component state accordingly
Test the feature to ensure it works as expected
Sde1 Jobs
Q9. Internal working of HashMap?calculation part also
HashMap is a data structure that stores key-value pairs and uses hashing to efficiently retrieve values.
HashMap uses an array of linked lists to store key-value pairs.
When a key-value pair is added, the key is hashed to determine the index in the array where it will be stored.
If multiple keys hash to the same index (collision), a linked list is used to store all key-value pairs at that index.
To retrieve a value, the key is hashed again to find the index and then the linked li...read more
Q10. Coding question 1. Find maximum subarray
Maximum subarray problem is to find the contiguous subarray with maximum sum in an array of integers.
Use Kadane's algorithm to find the maximum subarray sum in linear time complexity.
Initialize two variables, max_so_far and max_ending_here, to track the maximum sum so far and the maximum sum ending at the current index, respectively.
Iterate through the array and update max_ending_here and max_so_far accordingly.
Return max_so_far as the maximum subarray sum.
Q11. reverse the link list
Reverse a linked list
Iterate through the linked list and reverse the pointers
Use three pointers - prev, current, next to reverse the links
Update the head of the linked list to the last node after reversing
Q12. Multiply one matrix with another
Matrix multiplication involves multiplying the elements of one matrix with another matrix.
Create two matrices with compatible dimensions
Multiply corresponding elements of each row in the first matrix with each column in the second matrix
Sum the products to get the resulting matrix
Q13. Write function syantax
Function syntax is the structure and format of a function in a programming language.
Function name followed by parentheses and parameters
Code block enclosed in curly braces
Return statement to output a value
Example: function add(a, b) { return a + b; }
Example: function greet(name) { console.log('Hello, ' + name + '!'); }
Q14. Types of synchronization?
Types of synchronization include mutual exclusion, semaphores, monitors, and condition variables.
Mutual exclusion: Ensures that only one thread can access a resource at a time.
Semaphores: Used to control access to a common resource by multiple threads.
Monitors: Combines data and procedures into a single unit to control access to shared resources.
Condition variables: Allow threads to wait for a certain condition to be met before proceeding.
Q15. Largest common ancestor
Largest common ancestor is the most recent node that is a common ancestor of two or more nodes in a tree.
It is commonly used in computer science and genealogy.
In genealogy, it refers to the most recent common ancestor of two or more individuals.
In computer science, it is used in algorithms for finding the lowest common ancestor of two nodes in a tree.
It can be found using various algorithms such as Tarjan's off-line least common ancestors algorithm and the binary lifting algo...read more
Q16. Rain water trapping Problem
Rain water trapping problem refers to the accumulation of rainwater in low-lying areas or on flat roofs.
The problem can be solved by installing rainwater harvesting systems.
Proper drainage systems can also prevent rainwater trapping.
Green roofs and permeable pavements can help absorb rainwater.
Rain gardens can be created to collect and filter rainwater.
Regular maintenance of gutters and downspouts can prevent clogging and overflow.
The problem can lead to water damage, mold gr...read more
Q17. Capacity of SCP?
SCP stands for Secure, Contain, Protect. It refers to a fictional organization that secures and contains anomalous objects.
SCP Foundation is a fictional organization in the SCP universe that secures and contains anomalous objects
The capacity of SCP refers to the organization's ability to contain and manage these anomalous objects
SCP Foundation has various containment facilities with different capacities to house different types of anomalies
Top Interview Questions for Sde1 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