Virtusa Consulting Services
Elmack Engg Services Interview Questions and Answers
Q1. Rat in a Maze Problem Statement
You need to determine all possible paths for a rat starting at position (0, 0) in a square maze to reach its destination at (N-1, N-1). The maze is represented as an N*N matrix w...read more
Find all possible paths for a rat in a maze from source to destination.
Use backtracking to explore all possible paths in the maze.
Keep track of visited cells to avoid revisiting them.
Explore all possible directions (up, down, left, right) from each cell.
Add the current direction to the path and recursively explore further.
If the destination is reached, add the path to the list of valid paths.
Q2. Paths in a Matrix Problem Statement
Given an 'M x N' matrix, print all the possible paths from the top-left corner to the bottom-right corner. You can only move either right (from (i,j) to (i,j+1)) or down (fro...read more
Print all possible paths from top-left to bottom-right in a matrix by moving only right or down.
Use backtracking to explore all possible paths from top-left to bottom-right in the matrix.
At each cell, recursively explore moving right and down until reaching the bottom-right corner.
Keep track of the current path and add it to the result when reaching the destination.
Yes, I can create 2 tables in SQL and perform operations like INSERT, SELECT, UPDATE, and DELETE.
Create Table 1: CREATE TABLE employees (id INT, name VARCHAR(50), salary DECIMAL(10,2));
Create Table 2: CREATE TABLE departments (dept_id INT, dept_name VARCHAR(50));
Insert Data: INSERT INTO employees VALUES (1, 'John Doe', 50000);
Select Data: SELECT * FROM employees WHERE salary > 40000;
Update Data: UPDATE employees SET salary = 55000 WHERE id = 1;
Delete Data: DELETE FROM employe...read more
Q4. sql command for inserting details in table,changing them and deleting specifics ones
SQL commands for inserting, updating, and deleting data from a table.
INSERT INTO table_name (column1, column2, column3) VALUES (value1, value2, value3);
UPDATE table_name SET column1 = new_value1 WHERE condition;
DELETE FROM table_name WHERE condition;
Q5. sql command for creating a table
SQL command for creating a table
Use CREATE TABLE statement
Specify table name and column names with data types
Add any constraints or indexes as needed
Q6. difference between truncate and drop
Truncate and drop are SQL commands used to remove data from a table.
Truncate removes all data from a table but keeps the structure intact.
Drop removes the entire table and its structure.
Truncate is faster than drop as it only removes data.
Drop cannot be undone while truncate can be rolled back.
Truncate resets the identity of the table while drop does not.
Examples: TRUNCATE TABLE table_name; DROP TABLE table_name;
Q7. difference between c and c++
C++ is an extension of C with object-oriented programming features.
C++ supports classes and objects while C does not.
C++ has better support for polymorphism and inheritance.
C++ has a standard template library (STL) while C does not.
C++ allows function overloading while C does not.
C++ has exception handling while C does not.
Q8. What is polymorphism,buzz words of java
Polymorphism is the ability of an object to take on many forms.
Polymorphism allows objects of different classes to be treated as if they are of the same class.
It is achieved through method overloading and method overriding.
Example: A parent class Animal can have child classes like Dog, Cat, and Bird. Each child class can have its own implementation of the method 'makeSound', but they can all be called using the same method name from the parent class.
Java buzzwords related to ...read more
Q9. Difference between html and html5
HTML is the standard markup language for creating web pages, while HTML5 is the latest version with new features and improvements.
HTML is older and has limited functionality compared to HTML5
HTML5 supports new elements like <video>, <audio>, and <canvas>
HTML5 has improved support for multimedia and mobile devices
HTML5 includes new APIs like Geolocation, Web Storage, and Web Workers
More about working at Virtusa Consulting Services
Top HR Questions asked in Elmack Engg Services
Interview Process at Elmack Engg Services
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month