Codilar Technologies
Spark Minda Interview Questions and Answers
Q1. write SQL queries for 2nd maximum salary from employee table
SQL query to find 2nd maximum salary from employee table
Use ORDER BY and LIMIT to get the second highest salary
SELECT salary FROM employee ORDER BY salary DESC LIMIT 1, 1
Q2. Implement LinkedList Data Structure ?
A LinkedList is a linear data structure where each element is a separate object with a reference to the next element.
Create a Node class with data and next pointer
Initialize LinkedList with a head node pointing to null
Implement methods like insert, delete, search, and traverse
Example: Node class {int data; Node next;}
Example: Insert method to add a new node at the end of the list
Q3. Write down any sorting algorithm?
Bubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
Compare adjacent elements and swap if necessary
Repeat until no swaps are needed
Time complexity: O(n^2)
Space complexity: O(1)
Example: [5, 3, 8, 2, 1] -> [3, 5, 2, 1, 8] -> [3, 2, 1, 5, 8] -> [2, 1, 3, 5, 8] -> [1, 2, 3, 5, 8]
Q4. Difference between ecma6 and ecma5
ECMA6 introduced new features like arrow functions, classes, and let/const declarations compared to ECMA5.
ECMA6 introduced arrow functions for more concise syntax: const add = (a, b) => a + b;
ECMA6 added classes for object-oriented programming: class Person { constructor(name) { this.name = name; } }
ECMA6 introduced let/const declarations for block-scoped variables: let x = 5; const y = 10;
Q5. Can u deliver ur 100%
Yes, I am committed to giving my best effort and delivering 100% in all tasks.
I am dedicated to meeting deadlines and exceeding expectations
I have a strong work ethic and strive for excellence in all my work
I am willing to put in extra effort and work long hours if needed
Q6. form in reactjs
Form handling in ReactJS involves creating controlled components to manage form data and handle user input.
Use state to manage form data and update it with user input
Handle form submission with onSubmit event handler
Use controlled components to ensure form data is synced with state
Top HR Questions asked in Spark Minda
Interview Process at Spark Minda
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month