i
Snapdeal
Filter interviews by
Clear (1)
I applied via Company Website and was interviewed in Mar 2022. There were 2 interview rounds.
Bind creates a new function with a specified 'this' value and arguments.
Bind returns a new function with the same body as the original function.
The 'this' value of the new function is bound to the first argument passed to bind().
The subsequent arguments are passed as arguments to the new function.
Polyfill for bind() can be created using call() or apply() methods.
Event bubbling and event capturing are two mechanisms in JavaScript that describe the order in which events are handled.
Event bubbling is the process where an event is first captured by the innermost element and then propagated to its parent elements.
Event capturing is the opposite process where an event is first captured by the outermost element and then propagated to its child elements.
Event bubbling is the default b...
async loads script while page continues to load, defer loads script after page has loaded
async loads scripts asynchronously while page continues to load
defer loads scripts after the page has loaded
async scripts may not execute in order, while defer scripts do
async scripts may cause rendering issues, while defer scripts do not
Box model defines how elements are rendered in CSS. Specificity determines which CSS rule applies to an element. Render-blocking statements delay page rendering.
Box model includes content, padding, border, and margin.
Specificity is calculated based on the number of selectors and their types.
Render-blocking statements are CSS or JavaScript files that prevent the page from rendering until they are loaded.
Use media querie...
Saas is a CSS preprocessor that extends the functionality of CSS with variables, mixins, and more.
Saas stands for Syntactically Awesome Style Sheets
It allows for the use of variables, mixins, and functions in CSS
Saas code must be compiled into CSS before it can be used in a web page
Saas is often used in conjunction with build tools like Gulp or Webpack
Code to check equality of two objects in JavaScript
Use the JSON.stringify() method to convert the objects into strings
Compare the string representations of the objects using the === operator
If the strings are equal, the objects are considered equal
Code to find if input date is today/tomorrow or no of days difference from current date.
Get current date using Date() constructor
Convert input date to Date object
Compare input date with current date to check if it's today/tomorrow
If not, calculate the difference in days using getTime() method
Output the result accordingly
Implement infinite scrolling in React JS using Intersection Observer API.
Use Intersection Observer API to detect when the user has scrolled to the bottom of the page.
Fetch new data and append it to the existing data using setState.
Use a loading spinner to indicate that new data is being fetched.
Add a debounce function to prevent multiple API calls while scrolling.
Use a key prop when rendering the list of data to avoid
Top trending discussions
PreOrder traversal without recursion is done using a stack to simulate the function call stack.
Create an empty stack and push the root node onto it.
While the stack is not empty, pop a node from the stack and process it.
Push the right child of the popped node onto the stack if it exists.
Push the left child of the popped node onto the stack if it exists.
Yes
Create an empty binary search tree (BST)
Loop over the unsorted array
For each element, insert it into the BST using the appropriate insertion logic
Repeat until all elements are inserted
The resulting BST will be built from the unsorted array
The question asks to find two elements in an array whose sum is equal to a given number.
Iterate through the array and for each element, check if the difference between the given number and the current element exists in the array.
Use a hash set to store the elements as you iterate through the array for efficient lookup.
Return the pair of elements if found, otherwise return a message indicating no such pair exists.
There are two types of triggers: DML triggers and DDL triggers.
DML triggers are fired in response to DML (Data Manipulation Language) statements like INSERT, UPDATE, DELETE.
DDL triggers are fired in response to DDL (Data Definition Language) statements like CREATE, ALTER, DROP.
Examples: A DML trigger can be used to log changes made to a table, while a DDL trigger can be used to enforce certain rules when a table is alt
Yes, triggers can be used with select statements in SQL.
Triggers are database objects that are automatically executed in response to certain events, such as insert, update, or delete operations.
While triggers are commonly used with insert, update, and delete statements, they can also be used with select statements.
Using triggers with select statements allows you to perform additional actions or validations before or af...
Indexing in MySQL improves query performance. There are several types of indexing in MySQL.
Indexes are used to quickly locate data without scanning the entire table.
Types of indexing in MySQL include B-tree, hash, full-text, and spatial indexes.
B-tree indexes are the most common and suitable for most use cases.
Hash indexes are used for exact match lookups.
Full-text indexes are used for searching text-based data efficie...
Engines in MySQL are the underlying software components that handle storage, indexing, and querying of data.
MySQL supports multiple storage engines, each with its own strengths and features.
Some commonly used engines in MySQL are InnoDB, MyISAM, and Memory.
InnoDB is the default engine in MySQL and provides support for transactions and foreign keys.
MyISAM is known for its simplicity and speed but lacks transaction suppo...
Yes, a constructor can be private.
A private constructor can only be accessed within the class itself.
It is often used in singleton design pattern to restrict object creation.
Private constructors are also useful for utility classes that only contain static methods.
Merge sort algorithm can be used to sort the balls in each basket and then merge the sorted baskets.
Apply merge sort algorithm to sort the balls in each basket
Merge the sorted baskets to get the final sorted order
Use recursion to implement merge sort
Time complexity of merge sort is O(nlogn)
Mutual Exclusion is a technique to ensure that only one process at a time can access a shared resource.
It prevents race conditions and ensures data consistency.
It can be implemented using locks, semaphores, or monitors.
Examples include critical sections in multi-threaded programs and database transactions.
It can lead to performance issues if not implemented efficiently.
Multithreading is the ability of a CPU to execute multiple threads concurrently. A process is an instance of a program in execution.
Multithreading allows multiple threads to run concurrently within a single process.
Threads share the same memory space and resources of the process they belong to.
Processes are independent of each other and have their own memory space and resources.
Threads are lightweight compared to proce...
Semaphore is a synchronization object used to control access to a shared resource.
Semaphore is used to limit the number of threads accessing a shared resource.
It can be used to implement critical sections and avoid race conditions.
Semaphore can be binary or counting, depending on the number of resources available.
Examples of semaphore in programming languages include Java's Semaphore class and Python's threading.Semaph
Wait for completion of all threads and join them into a single thread.
Use join() method to wait for completion of each thread.
Create a new thread and call start() method to start the execution of all threads.
Use sleep() method to pause the execution of the current thread until all threads complete their execution.
To delete 95,000 records with limited local memory, use batch processing and delete in chunks.
Use batch processing to delete records in chunks
Delete records in descending order of their IDs to avoid index fragmentation
Commit the transaction after deleting each batch to avoid long-running transactions
Consider archiving the deleted records instead of permanently deleting them
Program in C to implement a function 'sum' that performs integer addition, float addition, and string concatenation based on the input arguments.
Define the function 'sum' with two arguments of type 'void *'.
Use 'if-else' statements to check the data type of the arguments.
Perform integer addition if both arguments are of type 'int'.
Perform float addition if both arguments are of type 'float'.
Concatenate the strings if b...
SQL query for creating tables
Use CREATE TABLE statement
Specify table name and column names with data types
Add constraints like primary key, foreign key, etc.
Example: CREATE TABLE customers (id INT PRIMARY KEY, name VARCHAR(50), email VARCHAR(50))
Nested tables are tables within tables, used to organize and store complex data structures.
Nested tables are commonly used in databases to store arrays of data within a single row of a table.
They can also be used in programming languages to create multidimensional arrays.
Accessing data within a nested table requires using multiple levels of indexing.
Nested tables can improve data organization and simplify complex data
Views are virtual tables that display data from one or more tables in a database.
Views are created using SELECT statements.
They can be used to simplify complex queries.
They can also be used to restrict access to sensitive data.
Views do not store data themselves, but rather display data from underlying tables.
Changes made to the underlying tables are reflected in the view.
I am a software developer with experience in multiple programming languages and a passion for problem-solving.
Proficient in Java, Python, and C++
Experience with web development using HTML, CSS, and JavaScript
Familiarity with Agile development methodologies
Strong problem-solving and analytical skills
Excellent communication and teamwork abilities
Postfix expression can be evaluated using a stack data structure.
Create an empty stack
Scan the expression from left to right
If the scanned character is an operand, push it onto the stack
If the scanned character is an operator, pop two operands from the stack, perform the operation and push the result back
Repeat until the end of the expression
The final result is the top of the stack
In 5 years, I see myself as a senior software developer leading a team of developers to create innovative solutions.
Leading a team of developers to create innovative solutions
Continuing to learn and stay up-to-date with new technologies
Contributing to the growth and success of the company
Mentoring and coaching junior developers
Taking on more responsibilities and challenges
Ebay is a leading e-commerce platform with a global reach and a diverse range of products.
Ebay has a large and diverse customer base, providing opportunities to work on a variety of projects.
The company has a strong focus on innovation and technology, which aligns with my interests and skills.
Ebay offers a dynamic and fast-paced work environment, which I find exciting and challenging.
The company has a strong reputation...
I want to join eBay because of its global reach, innovative technology, and strong company culture.
Global reach: eBay operates in multiple countries, allowing me to work on projects with a global impact.
Innovative technology: eBay is known for its cutting-edge technology and continuous innovation, which excites me as a software engineer.
Strong company culture: eBay values diversity, collaboration, and personal growth, ...
Some of the top questions asked at the Snapdeal Front end Engineer interview -
Assistant Manager
103
salaries
| ₹0 L/yr - ₹0 L/yr |
Category Manager
93
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Executive
89
salaries
| ₹0 L/yr - ₹0 L/yr |
Deputy Manager
59
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
49
salaries
| ₹0 L/yr - ₹0 L/yr |
Flipkart
Amazon
Meesho
eBay