Add office photos
Engaged Employer

Fynd

3.5
based on 381 Reviews
Video summary
Filter interviews by

40+ Shlok Labs Interview Questions and Answers

Updated 9 Jan 2025

Q1. Write code to print numbers 1 to n where each number i should get printed after i seconds. Questions around let and var on the solution. Promisify the solution.

Ans.

Print numbers 1 to n with a delay of i seconds for each number.

  • Use a loop to iterate from 1 to n

  • Use setTimeout function to delay the printing of each number

  • Use let instead of var to avoid closure issues

  • Promisify the solution by returning a promise

Add your answer

Q2. System design for Coffee vending machine.

Ans.

Designing a coffee vending machine system.

  • Identify the types of coffee to be offered

  • Determine the payment methods (cash, card, mobile payment)

  • Select the appropriate hardware components (dispenser, grinder, etc.)

  • Develop software for user interface and payment processing

  • Implement sensors for inventory management

  • Ensure regular maintenance and cleaning

  • Consider energy efficiency and sustainability

Add your answer

Q3. What is async programming and why it is to be used?

Ans.

Async programming is a programming paradigm that allows multiple tasks to run concurrently without blocking the main thread.

  • Async programming is used to improve the performance of applications by allowing them to perform multiple tasks simultaneously.

  • It is particularly useful for I/O-bound operations, such as reading and writing to a database or network.

  • Async programming can be implemented using callbacks, promises, or async/await syntax.

  • Examples of async programming framewor...read more

Add your answer

Q4. Supposed products our product are damage delivered to customers how handle situation with customer

Ans.

Handle the situation with empathy and offer a solution to the customer.

  • Apologize for the inconvenience caused to the customer.

  • Assure the customer that the issue will be resolved as soon as possible.

  • Offer a solution such as a replacement or refund.

  • Follow up with the customer to ensure their satisfaction.

  • Take steps to prevent similar issues from happening in the future.

Add your answer
Discover Shlok Labs interview dos and don'ts from real experiences

Q5. Given 2 linked list find the intersection node if they intersect

Ans.

To find the intersection node of two linked lists, iterate through both lists and compare each node until a common node is found.

  • Iterate through both linked lists simultaneously

  • Compare each node of the lists until a common node is found

  • If the lists have different lengths, align the starting points by advancing the longer list

Add your answer

Q6. Show projects from oldest to newest (only final outcome)

Ans.

I will showcase my projects from oldest to newest, displaying only the final outcomes.

  • Start with the earliest project and work your way to the most recent one

  • Focus on showcasing the final deliverables or outcomes of each project

  • Provide a brief overview or context for each project if necessary

Add your answer
Are these interview questions helpful?

Q7. Why cross entropy loss is used in classification, why not SSE?

Ans.

Cross entropy loss is used in classification because it penalizes incorrect classifications more heavily, making it more suitable for classification tasks compared to SSE.

  • Cross entropy loss is more suitable for classification tasks because it penalizes incorrect classifications more heavily than SSE.

  • Cross entropy loss is commonly used in scenarios where the output is a probability distribution, such as in multi-class classification.

  • SSE (Sum of Squared Errors) is more suitable...read more

Add your answer

Q8. Write a code for pre processing the image data before feeding it to model. The image ratios should be maintained. And the basics of django, like how to register more than one model in django.

Ans.

Preprocess image data while maintaining ratios and register multiple models in Django.

  • Resize images while maintaining aspect ratio using libraries like PIL or OpenCV

  • Normalize pixel values to a range of 0-1 for better model performance

  • Augment data using techniques like rotation, flipping, or cropping to increase dataset size

  • Use data generators in Keras to efficiently load and preprocess images in batches

  • Register multiple models in Django by creating separate model classes in m...read more

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. Data structures overview using stacks, queue

Ans.

Stacks and queues are fundamental data structures used for storing and accessing data in a specific order.

  • Stacks follow the Last In First Out (LIFO) principle, where the last element added is the first one to be removed. Example: Undo functionality in text editors.

  • Queues follow the First In First Out (FIFO) principle, where the first element added is the first one to be removed. Example: Print job queue in a printer.

  • Stacks are typically used for function call management, expr...read more

Add your answer

Q10. What are callback functions in Javascript?

Ans.

Callback functions are functions passed as arguments to another function and executed later when the parent function is done.

  • Callback functions are used for asynchronous programming in JavaScript.

  • They are commonly used in event handling, AJAX requests, and timeouts.

  • Callback functions can be named or anonymous.

  • Example: setTimeout(function() { console.log('Hello, world!'); }, 1000);

Add your answer

Q11. Find count of words in a sentence using Map

Ans.

Count words in a sentence using Map

  • Split the sentence into an array of words

  • Create a Map object

  • Loop through the array and add each word as a key to the map with a value of 1

  • If the word already exists in the map, increment its value by 1

  • Return the map

Add your answer

Q12. Virtual Dom and it's working behind the scene

Ans.

Virtual DOM is a lightweight copy of the actual DOM in memory, used for efficient updates and rendering in web development.

  • Virtual DOM is a concept used in frameworks like React to improve performance by minimizing actual DOM manipulations.

  • When changes are made to the virtual DOM, a diffing algorithm compares it with the actual DOM and only updates the necessary parts.

  • This helps in reducing the number of updates needed and improves the overall performance of the application.

  • E...read more

Add your answer

Q13. How will you Handle/ Locate Dynamic Web Elements in a Web Table?

Ans.

To handle dynamic web elements in a web table, I will use techniques like XPath, CSS selectors, and dynamic element identification.

  • Use XPath to locate elements based on their attributes or position in the DOM

  • Utilize CSS selectors to target specific elements based on their styling

  • Implement dynamic element identification techniques to handle elements that change on page reloads or updates

Add your answer

Q14. Why ORMs are used? Write SQL query for two-three questions!

Ans.

ORMs are used to map object-oriented code to relational databases.

  • ORMs simplify database interactions by abstracting away SQL syntax.

  • ORMs allow developers to work with objects instead of raw SQL queries.

  • ORMs can handle complex relationships between database tables.

  • ORMs can improve code readability and maintainability.

  • Example ORMs include Hibernate for Java and Entity Framework for .NET.

View 1 answer

Q15. how to implement infinite scroll

Ans.

Implementing infinite scroll involves dynamically loading content as the user scrolls down the page.

  • Use JavaScript to detect when the user reaches the bottom of the page

  • Make an AJAX call to fetch more content from the server

  • Append the new content to the existing content on the page

Add your answer

Q16. what is etherum 2.0,the aremore towards your project

Ans.

Ethereum 2.0 is a major upgrade to the Ethereum blockchain, introducing new features like Proof of Stake and sharding.

  • Ethereum 2.0 aims to improve scalability and security of the network

  • It introduces a new consensus mechanism called Proof of Stake, which replaces Proof of Work

  • Sharding is also introduced, which allows for parallel processing of transactions

  • Ethereum 2.0 is being rolled out in phases, with the first phase already live

  • The upgrade is expected to make Ethereum more...read more

Add your answer

Q17. How to connect kubernetes pod How to create unit test plan Do you know how to create use cases Do you know how to create test templates

Ans.

Answering questions related to Kubernetes pod connection, unit test plan creation, use case and test template creation.

  • To connect to a Kubernetes pod, use kubectl command-line tool or API calls

  • To create a unit test plan, identify the test cases, define the expected results, and create test scripts

  • To create use cases, identify the user's goals, define the steps to achieve them, and document the scenarios

  • To create test templates, define the test scenarios, test cases, and expec...read more

Add your answer

Q18. Explain LSTM and how to use for forecasting

Ans.

LSTM (Long Short-Term Memory) is a type of recurrent neural network that is capable of learning long-term dependencies.

  • LSTM is designed to overcome the vanishing gradient problem in traditional RNNs.

  • It has three gates: input gate, forget gate, and output gate, which control the flow of information.

  • LSTM is commonly used for time series forecasting, such as predicting stock prices or weather patterns.

  • To use LSTM for forecasting, historical data is fed into the network to train ...read more

Add your answer

Q19. how communication with customer

Ans.

Communication with customers is key to successful sales. It involves active listening, clear messaging, and building rapport.

  • Active listening to understand customer needs and concerns

  • Clear messaging to convey product benefits and value proposition

  • Building rapport to establish trust and long-term relationships

  • Using appropriate communication channels (phone, email, in-person) based on customer preference

  • Following up promptly and consistently to maintain engagement

  • Handling objec...read more

Add your answer

Q20. Scaling patterns for distributed system.

Ans.

Scaling patterns for distributed system

  • Horizontal scaling - adding more instances of the same component

  • Vertical scaling - increasing the resources of a single instance

  • Sharding - partitioning data across multiple nodes

  • Caching - storing frequently accessed data in memory

  • Load balancing - distributing traffic across multiple nodes

  • Auto-scaling - automatically adjusting resources based on demand

Add your answer

Q21. How promote products

Ans.

Promoting products involves identifying target audience, creating compelling messaging, utilizing various marketing channels, and building relationships.

  • Identify target audience and their needs

  • Create compelling messaging that highlights product benefits

  • Utilize various marketing channels such as social media, email marketing, and advertising

  • Build relationships with potential customers through networking and follow-up

  • Offer promotions or discounts to incentivize purchases

  • Collect...read more

Add your answer

Q22. What are promises in Javascript?

Ans.

Promises are objects that represent the eventual completion or failure of an asynchronous operation.

  • Promises are used to handle asynchronous operations in JavaScript

  • They provide a way to execute code asynchronously and handle the result when it's ready

  • Promises have three states: pending, fulfilled, or rejected

  • They can be chained together using .then() and .catch() methods

  • Promises help avoid callback hell and make code more readable

Add your answer

Q23. Write a prototype for array.filter

Ans.

Prototype for array.filter function to filter array of strings

  • Use Array.prototype.filter method to iterate through the array

  • Pass a callback function to filter out elements based on a condition

  • Return a new array with filtered elements

Add your answer

Q24. And how handle customer

Ans.

I handle customers by actively listening to their needs and providing personalized solutions.

  • Actively listen to customer needs

  • Provide personalized solutions

  • Be empathetic and understanding

  • Maintain a positive attitude

  • Follow up with customers to ensure satisfaction

Add your answer

Q25. What is event loop?

Ans.

Event loop is a mechanism in JavaScript that allows for asynchronous operations to be executed in a non-blocking way.

  • Event loop is responsible for handling asynchronous operations in JavaScript.

  • It allows for tasks to be queued and executed in a non-blocking manner.

  • Event loop continuously checks the call stack and the task queue, moving tasks from the queue to the stack when the stack is empty.

  • Example: setTimeout() function in JavaScript uses the event loop to execute a functi...read more

Add your answer

Q26. What are indexes in sql this the ne, t wn

Ans.

Indexes in SQL are data structures that improve the speed of data retrieval operations on a database table.

  • Indexes are created on columns in a database table to quickly retrieve data based on the values in those columns.

  • They help in reducing the time taken to fetch data by acting as a roadmap to the data.

  • Examples of indexes include primary keys, unique keys, and non-unique indexes.

Add your answer

Q27. Best gpu operations for building a huge ml model

Ans.

Utilize GPUs for matrix multiplication, deep learning operations, and parallel processing.

  • Use GPUs for matrix multiplication to speed up computation.

  • Utilize GPUs for deep learning operations like training neural networks.

  • Take advantage of GPUs for parallel processing to handle large datasets efficiently.

Add your answer

Q28. Guesstimate flights running from Bangalore airport

Ans.

There are approximately 500 flights running from Bangalore airport daily.

  • Consider peak hours and off-peak hours for flight schedules

  • Include domestic and international flights

  • Factor in different airlines operating from the airport

Add your answer

Q29. Javascript concepts in deep

Ans.

JavaScript concepts cover a wide range of topics including data types, functions, scope, closures, and more.

  • Data types include strings, numbers, booleans, arrays, objects, and more.

  • Functions are first-class citizens in JavaScript and can be passed around as arguments or returned from other functions.

  • Scope refers to the visibility of variables within a program, with global and local scopes.

  • Closures allow functions to retain access to variables from their containing scope even ...read more

Add your answer

Q30. What is sql this is the major qn??!

Ans.

SQL is a programming language used for managing and manipulating relational databases.

  • SQL stands for Structured Query Language.

  • It is used to communicate with databases to retrieve, insert, update, and delete data.

  • Common SQL commands include SELECT, INSERT, UPDATE, DELETE, JOIN, and CREATE.

  • Example: SELECT * FROM employees WHERE department = 'IT';

Add your answer

Q31. RCA case about dip in PDP > Cart conversion

Ans.

Analyzing root cause analysis case of dip in PDP leading to cart conversion issue

  • Identify potential reasons for the dip in PDP views such as technical issues, changes in user behavior, or marketing campaigns

  • Analyze the impact of the dip on cart conversion rates to understand the correlation between the two metrics

  • Conduct A/B testing to determine if any changes made to the PDP directly affect cart conversion rates

  • Consider user feedback and surveys to gather insights on potenti...read more

Add your answer

Q32. Database design and principles

Ans.

Database design involves organizing and structuring data in a way that ensures efficiency, scalability, and data integrity.

  • Understand the requirements of the application to determine the appropriate database model (relational, NoSQL, etc.)

  • Normalize the database to reduce redundancy and improve data integrity

  • Consider indexing for faster data retrieval

  • Implement proper relationships between tables using foreign keys

  • Optimize queries for better performance

Add your answer

Q33. How does RNN work?

Ans.

RNN is a type of neural network that can process sequential data by retaining memory of previous inputs.

  • RNN stands for Recurrent Neural Network.

  • It has loops in the network, allowing information to persist.

  • RNNs are commonly used in natural language processing and time series analysis.

  • Example: Predicting the next word in a sentence based on previous words.

Add your answer

Q34. Event loop in Js

Ans.

Event loop in JavaScript manages asynchronous operations by executing callback functions in a queue.

  • Event loop is responsible for handling asynchronous operations in JavaScript.

  • It continuously checks the call stack for any pending tasks and executes them in order.

  • Event loop ensures that the code runs efficiently without blocking the main thread.

  • Example: setTimeout function in JavaScript uses the event loop to execute a callback function after a specified delay.

Add your answer

Q35. Prototypes in js

Ans.

Prototypes in JavaScript are used to add new properties or methods to existing objects.

  • Prototypes allow for inheritance in JavaScript.

  • All objects in JavaScript are linked to a prototype object.

  • Modifying the prototype object affects all instances of that object type.

Add your answer

Q36. Exceptions, waits in Selenium

Ans.

Exceptions and waits are important concepts in Selenium for handling errors and synchronization.

  • Exceptions are used to handle errors that occur during test execution.

  • Selenium provides various types of waits like implicit, explicit, and fluent waits to synchronize test execution with the application.

  • Implicit waits wait for a certain amount of time before throwing an exception if the element is not found.

  • Explicit waits wait for a certain condition to be met before proceeding wi...read more

Add your answer

Q37. Test cases for a lift

Ans.

Test cases for a lift

  • Test if the lift moves up and down

  • Test if the lift stops at each floor

  • Test if the lift door opens and closes properly

  • Test if the lift can handle maximum weight capacity

  • Test if the emergency stop button works

  • Test if the lift can handle power failure

  • Test if the lift has proper ventilation and lighting

Add your answer

Q38. Find Missing numbers from an Integer Array

Ans.

Find missing numbers in an integer array

  • Iterate through the array and keep track of seen numbers

  • Compare the seen numbers with a range of expected numbers to find missing ones

  • Handle edge cases like duplicates or negative numbers

  • Example: Array [1, 2, 4, 6] should return missing numbers 3 and 5

Add your answer

Q39. Explain webpack

Ans.

Webpack is a module bundler for JavaScript applications.

  • Webpack takes modules with dependencies and generates static assets representing those modules.

  • It can handle various types of assets like JavaScript, CSS, and images.

  • Webpack allows for code splitting, lazy loading, and hot module replacement.

  • Configuration is done through a webpack.config.js file.

  • Plugins and loaders can be used to extend Webpack's functionality.

Add your answer

Q40. Explain closures

Ans.

Closures are functions that have access to variables from their containing scope even after the scope has closed.

  • Closures allow functions to access variables from their outer function even after the outer function has finished executing.

  • They are useful for maintaining state in asynchronous operations.

  • Closures can be used to create private variables in JavaScript.

Add your answer

Q41. Difference beteen sql and nosql

Ans.

SQL is a relational database management system, while NoSQL is a non-relational database management system.

  • SQL uses structured query language for querying data

  • NoSQL databases are more flexible and can handle unstructured data

  • SQL databases are vertically scalable, while NoSQL databases are horizontally scalable

  • Examples of SQL databases include MySQL, Oracle, and SQL Server

  • Examples of NoSQL databases include MongoDB, Cassandra, and Redis

Add your answer

Q42. Code to Hit 1000 API request

Ans.

Use a loop to send 1000 API requests

  • Create a loop that iterates 1000 times

  • Inside the loop, make a request to the API endpoint

Add your answer

Q43. Explain the concept of monitoring

Ans.

Monitoring is the process of observing and tracking the performance and health of systems, applications, and infrastructure.

  • Monitoring involves collecting data on various metrics such as CPU usage, memory usage, network traffic, and response times.

  • It helps in identifying issues, predicting failures, and optimizing performance.

  • Monitoring tools like Nagios, Prometheus, and Grafana are commonly used in DevOps for real-time monitoring and alerting.

  • Monitoring can be done at differ...read more

Add your answer

Q44. Explain encoder decoder

Ans.

Encoder-decoder is a neural network architecture used for tasks like machine translation and image captioning.

  • Encoder processes input data and generates a fixed-length representation

  • Decoder takes the representation and generates output data

  • Commonly used in tasks like machine translation (e.g. translating English to French) and image captioning

Add your answer

Q45. Python code with explanation

Ans.

Python code to find the factorial of a number

  • Use a recursive function to calculate the factorial

  • Handle edge cases like 0 and negative numbers

  • Factorial of a number n is the product of all positive integers less than or equal to n

Add your answer

Q46. Explain k8s architecture

Ans.

Kubernetes (k8s) architecture is a container orchestration platform that manages containerized applications across a cluster of nodes.

  • Master Node: Controls the cluster and schedules workloads

  • Worker Nodes: Run containers and communicate with the master node

  • etcd: Key-value store for cluster data

  • API Server: Frontend for Kubernetes control plane

  • Controller Manager: Monitors cluster state and makes changes as needed

  • Scheduler: Assigns workloads to nodes based on resource requirement...read more

Add your answer

Q47. Write a docker file

Ans.

A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image.

  • Start with a base image

  • Use the RUN command to execute commands in the container

  • Use the COPY command to add files from the host machine to the container

  • Use the CMD command to specify the command to run when the container starts

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Shlok Labs

based on 55 interviews
Interview experience
3.8
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

4.4
 • 430 Interview Questions
3.8
 • 351 Interview Questions
4.2
 • 312 Interview Questions
3.2
 • 164 Interview Questions
3.7
 • 155 Interview Questions
View all
Top Fynd Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter