Virtusa Consulting Services
20+ AllHeart Web 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
Q2. 1.What is constraints and it's types? 2.what is meant by wrapper class? 3.What is meant by string buffer? 4.Write a program to print number of count of characters in a string and remove duplicates by giving use...
read moreThis interview includes questions related to constraints, wrapper class, string buffer, and programming.
Constraints are rules that limit the values or types of data that can be entered into a field or table. There are two types of constraints: column-level and table-level constraints.
Wrapper classes are classes that encapsulate primitive data types and provide methods to manipulate them. For example, Integer is a wrapper class for the int primitive data type.
StringBuffer is a...read more
Q3. 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
Q4. What was your experience in developing a pharmacy inventory management web application with a team of 3-5 members in collaboration with Virtusa, and what technologies did you utilize for the front-end and back-...
read moreI have experience developing a pharmacy inventory management web application with a team of 3-5 members in collaboration with Virtusa.
Utilized HTML, CSS, and JavaScript for the front-end development
Used Node.js and Express.js for the back-end development
Integrated MySQL database for storing inventory data
Implemented user authentication and authorization features
Collaborated with team members to ensure smooth development process
Q5. 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;
Q6. 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
Q8. Diff between function and stored procedure Define abstraction and encapsulation Oops concepts in detail
A function is a block of code that performs a specific task, while a stored procedure is a named group of SQL statements.
Functions are used to return a single value, while stored procedures can return multiple values.
Functions can be called from within SQL statements, while stored procedures are called using their name.
Functions are typically used for calculations or data manipulation, while stored procedures are used for complex tasks or business logic.
Functions are defined ...read more
Q9. 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;
Q10. Find the 2nd largest element in an array with O(n) time complexity
Use a single pass algorithm to find the 2nd largest element in an array.
Iterate through the array and keep track of the largest and second largest elements.
Initialize two variables to store the largest and second largest elements.
Compare each element with the largest and second largest elements and update accordingly.
Return the second largest element at the end of the iteration.
Q11. 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.
Q12. code for interchange of strings without strcpy
Use a loop to swap characters of two strings without using strcpy function.
Create two arrays of characters to store the strings
Use a loop to iterate through each character of the strings and swap them
Ensure to handle cases where strings have different lengths
Q13. 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
Q14. Tell me about Object class in Java
Object class is the root class for all Java classes, providing common methods and behaviors for all objects.
Object class is at the top of the class hierarchy in Java
All classes in Java are directly or indirectly derived from the Object class
Object class provides methods like equals(), hashCode(), toString() which can be overridden in subclasses
Q15. Difference between linkedlist and arry list
LinkedList is a data structure where elements are stored in nodes with pointers to the next element, while ArrayList is a dynamic array that can resize itself.
LinkedList uses nodes with pointers to the next element, allowing for efficient insertion and deletion operations.
ArrayList is a dynamic array that can resize itself, making it faster for random access but slower for insertion and deletion.
LinkedList is more memory efficient as it only needs to store the value and a poi...read more
Q16. OOPS concept and real time example
OOPS concept is a programming paradigm that uses objects and classes for organizing code. Real-time example: Car
Encapsulation: Car class with private variables like speed, color, and methods like accelerate, brake
Inheritance: Creating a subclass ElectricCar that inherits from Car class
Polymorphism: Overriding the accelerate method in ElectricCar class to increase speed differently
Q17. code for reverse the string
Code to reverse a string
Create an empty string to store the reversed string
Loop through the original string from the end to the beginning
Append each character to the empty string
Return the reversed string
Q18. deep copy shallow copy differences
Deep copy creates a new copy of an object with its own unique memory space, while shallow copy creates a new object that references the same memory locations as the original object.
Deep copy duplicates all nested objects, while shallow copy only duplicates the references to nested objects.
Deep copy ensures that changes to the copied object do not affect the original object, while shallow copy may lead to unintended side effects.
Examples: deep copy - using JSON.parse(JSON.stri...read more
Q19. 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
Q20. What is @configuration
Annotation used in Spring framework to indicate that a class declares one or more @Bean methods
Used in Spring framework to define configuration classes
Identifies a class as a source of bean definitions for the application context
Helps Spring to understand how beans are created and wired together
Q21. What is Oops with examples
Object-oriented programming (OOP) is a programming paradigm based on the concept of objects, which can contain data in the form of fields and code in the form of procedures.
OOP focuses on creating objects that interact with each other to solve problems
Encapsulation: Objects can hide their internal state and require interaction through well-defined interfaces
Inheritance: Objects can inherit attributes and methods from other objects
Polymorphism: Objects can take on different fo...read more
Q22. Explain about agile methodology
Agile methodology is an iterative and flexible approach to software development.
Agile methodology focuses on collaboration, adaptability, and delivering working software in short iterations.
It emphasizes customer satisfaction and welcomes changes in requirements throughout the development process.
It promotes self-organizing teams and encourages continuous improvement through regular feedback and retrospectives.
Common agile frameworks include Scrum, Kanban, and Extreme Program...read more
Q23. Explain about Hoisting in javascript
Hoisting is a JavaScript mechanism where variable and function declarations are moved to the top of their containing scope.
Variable declarations are hoisted to the top of their scope but not their assignments.
Function declarations are fully hoisted, meaning they can be called before they are declared.
Hoisting can lead to unexpected behavior if not understood properly.
Q24. Rate yourself in Java
I rate myself as highly proficient in Java with extensive experience in developing complex applications.
Strong understanding of core Java concepts such as OOP, multithreading, and collections
Experience in developing enterprise-level applications using Java frameworks like Spring and Hibernate
Proficient in writing efficient and optimized code, with a focus on performance tuning
Familiarity with Java development tools and IDEs such as Eclipse and IntelliJ IDEA
Q25. What are the joins
Joins are used in SQL to combine rows from two or more tables based on a related column between them.
Joins are used to retrieve data from multiple tables based on a related column between them
Common types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN
INNER JOIN returns rows when there is at least one match in both tables
LEFT JOIN returns all rows from the left table and the matched rows from the right table
RIGHT JOIN returns all rows from the right table an...read more
Q26. What is OOps concept
Object-oriented programming paradigm focusing on objects and classes for code organization and reusability.
Encapsulation: Bundling data and methods that operate on the data into a single unit (object)
Inheritance: Ability for a class to inherit properties and behavior from another class
Polymorphism: Ability for objects to be treated as instances of their parent class or their own class
Abstraction: Hiding complex implementation details and showing only necessary features to the...read more
Q27. What is java 8
Java 8 is a major release of the Java programming language with new features like lambda expressions, streams, and functional interfaces.
Introduced lambda expressions for functional programming
Added streams API for processing collections
Included default methods in interfaces for backward compatibility
Introduced new Date and Time API (java.time package)
More about working at Virtusa Consulting Services
Top HR Questions asked in AllHeart Web
Interview Process at AllHeart Web
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month