VELOTIO Technologies
20+ Trimurti Group Interview Questions and Answers
Q1. Array Subsets A Object is given , flat it with the prefix it's key. Reduce polyfill Compose and pipe Normal Js function(event loop, promise, let const var, prototype) Noraml React question.
The interview question covers topics like array subsets, reduce polyfill, compose and pipe, normal JS functions, and normal React questions.
For array subsets, use the Array.prototype.filter() method to filter out the elements that don't meet the subset criteria.
Reduce polyfill can be implemented using a for loop or recursion to iterate over the array and accumulate the result.
Compose and pipe are higher-order functions that allow you to combine multiple functions into a singl...read more
Q2. What's difference between async await and promise ?
Async/await is a syntactic sugar over Promises in JavaScript.
Async/await makes asynchronous code look and behave like synchronous code.
Promises are objects that represent the eventual completion or failure of an asynchronous operation.
Async/await is easier to read and write than Promises.
Async/await can only be used in functions that are marked as async.
Promises can be used anywhere in the code.
Q3. What's does the useCallback and usememo in react ?
useCallback and useMemo are hooks in React used for performance optimization.
useCallback is used to memoize a function and prevent unnecessary re-renders.
useMemo is used to memoize a value and prevent unnecessary re-computations.
Both hooks are used to optimize performance by reducing unnecessary re-renders and re-computations.
useCallback is useful when passing down functions to child components.
useMemo is useful when computing expensive values that don't change often.
Q4. How you handle difficult situations in software development?
I handle difficult situations in software development by staying calm, analyzing the problem, seeking input from team members, and finding creative solutions.
Stay calm and composed under pressure
Analyze the root cause of the problem
Seek input and collaboration from team members
Brainstorm and explore creative solutions
Prioritize tasks and focus on resolving the issue efficiently
Q5. Design game if cards and write a code to distribute cards and all other functions of cards game.
Design and code a card game with functions for distribution and gameplay.
Design the game with a set of rules and objectives.
Create a deck of cards with suits and values.
Write a function to shuffle and distribute cards to players.
Implement functions for gameplay actions like drawing, discarding, and scoring.
Consider adding features like player turns, AI opponents, and win conditions.
Q6. How will you sort 1TB of array/data
Use external sorting techniques like merge sort or quick sort to efficiently sort large amounts of data.
Divide the 1TB array into smaller chunks that can fit into memory
Sort each chunk individually using a fast sorting algorithm like merge sort or quick sort
Merge the sorted chunks back together to get the final sorted array
Consider using parallel processing or distributed systems for faster sorting
Example: Divide the 1TB array into 1000 chunks of 1GB each, sort them individua...read more
Q7. Difference between concurrency and parallelism
Concurrency is about dealing with multiple tasks at the same time, while parallelism is about executing multiple tasks simultaneously.
Concurrency is about managing multiple tasks and switching between them quickly.
Parallelism is about actually executing multiple tasks at the same time.
Concurrency can be achieved in a single-core processor through task switching.
Parallelism requires multiple cores or processors to execute tasks simultaneously.
Example: A web server handling mul...read more
Q8. Explain closure function with an example
Closure function is a function defined inside another function, with access to the outer function's variables.
Closure functions have access to the outer function's variables even after the outer function has finished executing.
They can be used to create private variables and functions in JavaScript.
Example: function outerFunction() { let outerVar = 'I am outer'; function innerFunction() { console.log(outerVar); } return innerFunction; }
Q9. Java project - get unique character count from string
Get unique character count from a Java string
Create a HashMap to store characters and their count
Loop through the string and add characters to the HashMap
Count the number of unique characters in the HashMap
Q10. What is event coupling
Event coupling is the dependency between different parts of a system based on events.
Event coupling occurs when one component triggers an event that another component listens for.
It can lead to tight coupling between components, making the system harder to maintain.
Reducing event coupling can be achieved by using a centralized event bus or implementing a pub/sub pattern.
Example: A button click event in a UI component triggering a data fetch in another component.
Q11. Print matrix in spiral form Print left+right view of tree
Printing matrix in spiral form and left+right view of tree
For matrix, use four pointers to traverse in spiral form
For tree, use recursion to traverse and print left and right view
For left view, print the first node encountered in each level
For right view, print the last node encountered in each level
Q12. What is hoisting
Hoisting is a JavaScript mechanism where variable and function declarations are moved to the top of their containing scope during compilation.
Variable declarations are hoisted to the top of their scope but not their initializations.
Function declarations are fully hoisted, meaning they can be called before they are declared.
Hoisting can lead to unexpected behavior if not understood properly.
Q13. What is throttling
Throttling is a technique used to control the rate at which a function is executed.
Throttling limits the number of times a function can be called over a specified period of time.
It helps in optimizing performance by preventing excessive function calls, especially in scenarios like scroll events or API requests.
Example: Throttling can be used to limit the rate at which a user can resize a window, ensuring smoother performance.
Q14. What is debouncing
Debouncing is a technique used to limit the number of times a function is called in a short period of time.
Debouncing is often used in scenarios like search bars where you want to wait for the user to finish typing before making an API call.
It involves setting a delay before executing a function after the last time it was called.
Debouncing helps in optimizing performance by reducing unnecessary function calls.
Example: Implementing a debounce function in JavaScript to delay AP...read more
Q15. Remove duplicates from array
Use Set to remove duplicates from array of strings
Create a Set from the array to automatically remove duplicates
Convert the Set back to an array to get unique values
Example: const arr = ['apple', 'banana', 'apple', 'orange']; const uniqueArr = [...new Set(arr)];
Q16. Reverse a Linked List
Reverse a linked list by changing the direction of pointers
Create three pointers: prev, current, next
Iterate through the linked list, updating pointers to reverse the direction
Return the new head of the reversed linked list
Q17. Find the nearest palindrome number for the given number.
To find the nearest palindrome number for a given number, we can increment or decrement the number until we find a palindrome.
Start by checking if the given number is a palindrome. If it is, then it is the nearest palindrome number.
If the given number is not a palindrome, increment or decrement the number and check if the new number is a palindrome.
Repeat the process until a palindrome number is found. The closest palindrome number will be the one with the smallest absolute d...read more
Q18. Find the common prefix for a given list of strings.
Find the common prefix for a given list of strings.
Iterate through the characters of the first string and compare with the corresponding characters of other strings.
Stop when a mismatch is found or when reaching the end of the shortest string.
Return the common prefix found.
Q19. Write class for School Design DB for Instagram
Answering interview questions for software developer backend
For School class, define properties like name, location, students, teachers, etc.
For Instagram DB, define tables for users, posts, comments, likes, etc.
Use relational database management system like MySQL or PostgreSQL.
Implement proper indexing and normalization to optimize performance.
Ensure data security and privacy by implementing authentication and authorization.
Consider scalability and availability by using load...read more
Q20. write sql query according to question
SQL query to find the total number of orders placed by each customer
Use GROUP BY clause to group orders by customer
Use COUNT() function to count the number of orders
Join the orders table with the customers table to get customer information
Q21. Experience on caching
Experience with caching is essential for optimizing performance and reducing load on servers.
Implemented caching mechanisms like Redis or Memcached to store frequently accessed data
Utilized caching strategies like time-based expiration or invalidation to ensure data freshness
Improved application performance by reducing database queries through caching
Handled cache misses gracefully to avoid performance degradation
Monitored cache usage and performance to identify bottlenecks a...read more
Q22. Monorepo and Microfrontend explain
Monorepo is a single repository for multiple projects while microfrontend is a frontend architecture pattern.
Monorepo allows for easier code sharing and version control across multiple projects.
Microfrontend breaks down a frontend into smaller, independent parts that can be developed and deployed separately.
Both can improve development efficiency and maintainability.
Example of Monorepo: Google's single repository for all their code.
Example of Microfrontend: Netflix's use of i...read more
Q23. what is springboot,orm,jpa
Spring Boot is a framework for building Java-based enterprise applications. ORM stands for Object-Relational Mapping, used to map objects to database tables. JPA is Java Persistence API, a standard for ORM in Java.
Spring Boot is a framework that simplifies the development of Java-based enterprise applications.
ORM (Object-Relational Mapping) is a programming technique for converting data between incompatible type systems.
JPA (Java Persistence API) is a standard for ORM in Java...read more
Q24. node affinity and taint tolerations difference.
Node affinity and taint tolerations are Kubernetes features used for controlling pod scheduling and placement.
Node affinity is used to specify rules for pod placement based on node labels.
Taint tolerations allow pods to tolerate specific taints on nodes and be scheduled on those nodes.
Node affinity is a way to attract or repel pods from certain nodes, while taint tolerations allow pods to tolerate tainted nodes.
Node affinity and taint tolerations can be used together to achie...read more
Q25. What is lazy loading
Lazy loading is a technique used to defer the loading of non-critical resources until they are actually needed.
It improves page load time and performance
It reduces the initial load time of a web page
It is commonly used for images, videos, and other media files
It can be implemented using JavaScript or server-side programming
Example: Images on a long-scrolling page are loaded only when they come into view
Q26. Explain oauth 2.0
OAuth 2.0 is an authorization framework that allows third-party applications to access user data without sharing passwords.
OAuth 2.0 provides a secure way to grant access to resources without sharing passwords.
It uses access tokens to grant access to resources.
OAuth 2.0 supports several grant types such as authorization code, implicit, client credentials, and resource owner password credentials.
Examples of OAuth 2.0 providers include Google, Facebook, and Twitter.
Q27. entrypoint vs cmd command
The entrypoint and cmd commands are used in Docker to specify the command that should be executed when a container is started.
The entrypoint command is used to specify the default executable for the container.
The cmd command is used to provide arguments to the entrypoint command.
The entrypoint command is not overridden by the command specified in the docker run command, while the cmd command can be overridden.
If both entrypoint and cmd are specified in a Dockerfile, the cmd c...read more
Q28. What are promises.
Promises are objects representing the eventual completion or failure of an asynchronous operation.
Promises are used in JavaScript to handle asynchronous operations.
They can be in one of three states: pending, fulfilled, or rejected.
Promises can be chained together using .then() to handle success and failure.
They help avoid callback hell and make asynchronous code more readable.
Example: Fetching data from an API returns a promise that resolves with the data or rejects with an ...read more
Q29. What are event loop.
Event loop is a mechanism in programming that allows for asynchronous execution of code by continuously checking for and handling events.
Event loop is commonly used in JavaScript to handle asynchronous operations like setTimeout, setInterval, and AJAX requests.
It allows for non-blocking I/O operations, ensuring that the program can continue running while waiting for I/O operations to complete.
Event loop works by continuously checking the event queue for any pending events and...read more
Interview Process at Trimurti Group
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month