TVS Next
Creative Factor Interview Questions and Answers
Q1. Write a program to check if an arraylist contains a duplicate element
Program to check for duplicate elements in an arraylist of strings
Iterate through the arraylist and use a HashSet to store unique elements
If an element is already in the HashSet, it is a duplicate
Return true if a duplicate is found, false otherwise
Q2. What's your strongest programming language
My strongest programming language is Java.
Extensive experience with Java programming
Proficient in object-oriented programming
Familiar with Java frameworks like Spring and Hibernate
Q3. Mention and explain 2 OOPS concepts
Encapsulation and Inheritance are two important OOPS concepts.
Encapsulation: Bundling data and methods that operate on the data into a single unit. Example: Class with private data members and public methods.
Inheritance: Ability of a class to inherit properties and behavior from another class. Example: Subclass inheriting from a superclass.
Q4. Given url to fetch data from api
Use the url to make a request to the API and fetch data.
Use a library like axios or fetch to make the HTTP request.
Parse the response data to extract the necessary information.
Handle any errors that may occur during the request.
Q5. Difference between Stack and Array
Stack is a data structure that follows Last In First Out (LIFO) principle, while an array is a data structure that stores elements in contiguous memory locations.
Stack is dynamic in size, while array has a fixed size.
Stack operations include push and pop, while array operations include random access.
Example: Stack can be implemented using arrays, but arrays cannot be implemented using stacks.
Q6. Components in reactjs
Reactjs components are reusable, independent pieces of UI that can be composed together to build complex user interfaces.
Components are the building blocks of a React application
They can be class components or functional components
Components can have their own state and lifecycle methods
Components can be nested within other components to create a hierarchy
Examples: Button component, Navbar component, UserList component
More about working at TVS Next
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month