Filter interviews by
Use hashmap to find duplicates in an array of strings
Create a hashmap to store each string as key and count as value
Iterate through the array and check if the string already exists in the hashmap
If it does, increment the count, else add it to the hashmap
Return the strings with count greater than 1 as duplicates
Singleton design pattern ensures a class has only one instance and provides a global point of access to it.
Create a private static instance variable in the class.
Provide a public static method to access the instance.
Ensure the constructor is private to prevent instantiation from outside the class.
transient and volatile are keywords in Java used for different purposes
transient keyword is used to indicate that a field should not be serialized when converting an object to byte stream
volatile keyword is used to indicate that a variable's value will be modified by different threads
transient keyword is used in serialization, while volatile keyword is used in multithreading
example: transient keyword - private transien...
Comparator and Comparable are interfaces in Java used for sorting objects.
Comparator interface is used to define custom sorting logic for objects.
Comparable interface is used to define natural ordering of objects.
Comparator is used when you want to sort objects based on multiple attributes.
Comparable is used when you want to sort objects based on a single attribute.
Example: Sorting a list of Person objects based on the...
I applied via LinkedIn and was interviewed before Jul 2023. There were 2 interview rounds.
At home coding assignment was given . This was pre Gen-AI era.
A coding qn was given and it need to be properly unit tested.
Implementing a factorial function using recursion
Define a function that takes an integer as input
Base case: if input is 0, return 1
Recursive case: return input multiplied by the factorial of input-1
Example: factorial(5) = 5 * factorial(4) = 5 * 4 * factorial(3) = ... = 5 * 4 * 3 * 2 * 1
Git rebase is a command used to reapply commits on top of another branch.
Git rebase is used to incorporate changes from one branch into another by reapplying commits on top of the target branch.
It helps in maintaining a linear project history by avoiding unnecessary merge commits.
Rebasing should be used with caution as it rewrites commit history and can cause conflicts.
Example: git rebase master - rebase current branch
React.cloneElement() is used to clone and return a new React element with updated props.
React.cloneElement() is used to clone a React element and pass new props to the cloned element.
It is commonly used when you need to add or update props of a React element without changing its key or ref.
Example: const element = React.cloneElement(originalElement, { newProp: value });
Context is a feature in React that allows data to be passed through the component tree without having to pass props down manually. Redux is a state management library for JavaScript applications.
Context is built into React and is primarily used for passing data through the component tree without having to pass props down manually.
Redux is a separate library that provides a centralized store for managing application sta...
A polyfill is a piece of code that provides the technology that you expect the browser to provide natively.
Polyfills are used to fill in the gaps in browser support for certain features.
They allow developers to use new features in older browsers.
Examples of polyfills include Babel for ES6 features and HTML5 Shiv for HTML5 elements in older browsers.
I applied via Approached by Company and was interviewed in Apr 2024. There were 4 interview rounds.
Contained only mcq questions related to maths and reasoning
Use Floyd's Cycle Detection Algorithm to detect two loops in a linked list.
Initialize two pointers, slow and fast, both starting at the head of the linked list.
Move slow pointer by one step and fast pointer by two steps in each iteration.
If they meet at some point, there is a loop. Reset one pointer to head and move both by one step until they meet again to find the start of the loop.
Few basics of java
Dsa question
Basic aptitude questions. Could be done easily if practiced enough
posted on 23 Jul 2024
posted on 7 Aug 2024
I applied via Job Portal
Coding test was of two hours, and two difficult hard question was passed
In the group discussion, they asked the question based on the project
I was interviewed in Dec 2023.
Angular lifecycle hooks are methods that allow you to tap into specific points in a component's lifecycle.
ngOnChanges: called when an input property changes
ngOnInit: called once the component is initialized
ngDoCheck: called during every change detection run
ngAfterContentInit: called after content (ng-content) has been projected into the component
ngAfterContentChecked: called after every check of the projected content
ng...
posted on 6 Jun 2024
Services in Drupal are reusable objects that perform specific functions, such as database queries or sending emails.
Services are defined in YAML files and can be accessed throughout a Drupal site.
They are used to encapsulate reusable functionality and promote code reusability.
Examples of services in Drupal include the database service for interacting with the database, the mail service for sending emails, and the logge
Debugging in Drupal involves using tools like Devel module, watchdog(), and error logs.
Enable Devel module for debugging information
Use watchdog() function to log messages to Drupal's watchdog log
Check error logs for PHP errors and warnings
Use dpm() function to print variables for debugging purposes
I applied via Company Website and was interviewed in Sep 2023. There were 3 interview rounds.
Var is function scoped, let is block scoped in JavaScript.
Var is function scoped, let is block scoped
Var can be redeclared, let cannot
Var is hoisted to the top of the function, let is not
Use let for block-level variables, var for function-level variables
React hooks are functions that let you use state and other React features in functional components.
useState: allows functional components to have local state
useEffect: allows side effects in functional components
useContext: allows functional components to access context
useReducer: alternative to useState for more complex state logic
useMemo: memoizes the result of a function
useCallback: memoizes a callback function
useRe...
Interview experience
Consultant
7.6k
salaries
| ₹7 L/yr - ₹26.5 L/yr |
Assistant Manager
6.9k
salaries
| ₹10.7 L/yr - ₹32 L/yr |
Associate Consultant
4.5k
salaries
| ₹4.5 L/yr - ₹15.5 L/yr |
Analyst
3.5k
salaries
| ₹1 L/yr - ₹8 L/yr |
Manager
2.8k
salaries
| ₹12 L/yr - ₹46 L/yr |
Cognizant
PwC
Capgemini