Turing
30+ Interview Questions and Answers
Q1. There is a square field of 10m×10m which is divided into 100 squared blocks. Each block can either contain wheat field or corn field. What is the maximum No. of corn field are possible in a such way than no two...
read moreThe maximum number of corn fields possible in a 10m×10m square field without sharing edges is 25.
The maximum number of corn fields is achieved by placing them in a diagonal pattern across the field.
Each corn field will have 4 wheat fields surrounding it to ensure no two corn fields share an edge.
The total number of corn fields possible in this arrangement is 25.
Q2. What is the neihbourhood in which superhosts have the biggest median pries difference with respect to non superhosts ?
The neighbourhood with the biggest median price difference between superhosts and non superhosts is X.
Calculate the median price for superhosts and non superhosts in each neighbourhood
Find the neighbourhood with the largest difference in median prices between superhosts and non superhosts
Example: Neighbourhood X has a median price of $200 for superhosts and $150 for non superhosts, resulting in a $50 difference
Q3. Find all the numbers that appear at least three times consecutively return the result table in any order
Find numbers that appear at least three times consecutively in any order.
Use a window function to track consecutive numbers
Filter the result to only include numbers that appear at least three times consecutively
Return the result table in any order
Q4. Given a string s and integer k , return the maximum number of vowel letters in any substring of s with length k. vowel letters in English are 'a','e','i','o','u' .
Find the maximum number of vowels in any substring of length k in a given string.
Iterate through the string with a sliding window of size k, counting vowels in each substring.
Keep track of the maximum vowel count encountered.
Return the maximum vowel count found.
Q5. Statistical Significance - what it is? and how to use hypothesis testing
Statistical significance refers to the likelihood that a result or relationship is not due to chance.
Statistical significance is a measure of the probability that a relationship between variables is not due to random chance.
Hypothesis testing is a common method to determine statistical significance by comparing observed data to what would be expected by chance.
A p-value is used to determine statistical significance, with a lower p-value indicating stronger evidence against th...read more
Q6. How did you manage to validate the information when there was some conflictincting information presented to you ?
I cross-referenced the conflicting information with other reliable sources and consulted with relevant stakeholders to determine the accuracy.
Cross-referenced conflicting information with other reliable sources
Consulted with relevant stakeholders for clarification
Analyzed the context and credibility of each source before making a decision
Q7. Guestimate Question : How many people are there wearing spectacles in Delhi?
It is difficult to accurately estimate the number of people wearing spectacles in Delhi without specific data.
Population of Delhi is around 20 million, so a rough estimate could be based on the global average of 25% of the population wearing spectacles.
Factors such as age demographics, income levels, and access to healthcare facilities can also influence the number of people wearing spectacles.
Survey data or market research reports on eyewear usage in Delhi could provide more...read more
Q8. Guestimate Question : How many red lights are there in Bangalore?
It is impossible to accurately estimate the number of red lights in Bangalore without specific data.
The number of red lights in a city can vary based on factors such as population density, traffic flow, and urban planning.
One would need access to official records or data from the city's transportation department to make a more accurate estimation.
Factors like new road constructions, traffic patterns, and signal upgrades can also impact the number of red lights in a city.
Q9. Describe a situation where you have solved complex problem with limited source of information?
Solved a complex problem with limited information by breaking it down into smaller parts and conducting thorough research.
Identified key components of the problem
Conducted thorough research to gather relevant information
Utilized critical thinking and problem-solving skills to connect the dots
Consulted with experts or colleagues for additional insights
Tested different solutions to find the most effective one
Q10. What is the angle between minute and hour clock when the clock strikes 2:20?
The angle between the minute and hour hands of a clock at 2:20 is 50 degrees.
Calculate the angle formed by the hour hand from 12 o'clock to the current time (2:20)
Calculate the angle formed by the minute hand from 12 o'clock to the current time (20 minutes past the hour)
Subtract the smaller angle from the larger angle to get the angle between the minute and hour hands
Q11. To develop a flask application which handles the requests.
Flask is a lightweight web framework for Python that allows you to easily handle HTTP requests.
Create a Flask application by importing the Flask class
Define routes using the @app.route decorator
Handle different types of requests (GET, POST, etc.) using route functions
Return responses using the jsonify function for JSON data
Run the Flask application using the app.run() method
Q12. The overall quality of the process isn't improving. How do you tackle this situation?
To improve the overall quality of the process, I would focus on identifying root causes, implementing process improvements, and monitoring results.
Conduct a thorough analysis to identify the root causes of the quality issues
Collaborate with stakeholders to develop and implement process improvements
Establish key performance indicators (KPIs) to monitor the effectiveness of the changes
Regularly review and adjust the process based on feedback and data
Provide training and support...read more
Q13. Check if the sentence is palindrome or not.
Check if a sentence is a palindrome or not.
Remove all non-alphanumeric characters and convert to lowercase.
Compare the original sentence with its reverse to check for palindrome.
Example: 'A man, a plan, a canal, Panama' is a palindrome sentence.
Q14. How many tennis ball will fit into a school bus?
The number of tennis balls that can fit into a school bus depends on the size of the bus and the size of the tennis balls.
Calculate the volume of the school bus and the volume of a tennis ball to determine how many can fit
Consider the packing efficiency of the tennis balls to account for empty space
Assume a standard size for the school bus and tennis balls for easier calculation
Q15. What are the best practices to avoid rerenders and to improve performance
Use memoization, virtual DOM, and shouldComponentUpdate to avoid unnecessary rerenders and improve performance.
Implement memoization to store the result of expensive function calls and avoid recalculating them.
Use virtual DOM to efficiently update only the parts of the UI that have changed.
Override shouldComponentUpdate to prevent unnecessary rerenders by comparing current and next props/state.
Q16. How to optimise performance of a Nodejs app
Optimizing performance of a Nodejs app involves various techniques to improve speed and efficiency.
Use asynchronous programming to handle multiple requests efficiently
Implement caching to reduce redundant database queries
Optimize code by removing unnecessary loops and function calls
Use a load balancer to distribute traffic evenly across multiple servers
Monitor and analyze performance using tools like New Relic or Datadog
Q17. Write a program to where a robber should be able to rob max amount of money from 9 houses, alarm will ring if 2 consecutive houses are robbed
Program to maximize money from robbing 9 houses without triggering alarm for consecutive robberies
Create a list of money in each house
Use dynamic programming to keep track of maximum money robbed without triggering alarm
Consider robbing or skipping each house based on previous robberies
Example: houses = [10, 20, 15, 25, 10, 30, 50, 5, 40]
Q18. Measure 4 Liters out of two vessels that are of 5 Liters and 3 Liters
To measure 4 liters from 5 and 3 liter vessels, fill 3 liter vessel, pour into 5 liter vessel, refill 3 liter vessel, pour into 5 liter vessel until it is full.
Fill the 3 liter vessel completely
Pour the water from the 3 liter vessel into the 5 liter vessel
Refill the 3 liter vessel
Pour the water from the 3 liter vessel into the 5 liter vessel until it is full
Q19. What is chord diameter radius in a circle
The chord is a line segment connecting two points on a circle. The diameter is a chord that passes through the center of the circle. The radius is the distance from the center to any point on the circle.
Chord is a line segment connecting two points on a circle
Diameter is a chord that passes through the center of the circle
Radius is the distance from the center to any point on the circle
Chord length can be calculated using the Pythagorean theorem
Q20. Merge two sorted linked list and from scratch, create class of linked list then create method of generating linked list
Merge two sorted linked lists by creating a linked list class and method to generate linked lists from scratch.
Create a Node class with data and next pointer
Create a LinkedList class with methods to insert nodes and merge two lists
Iterate through both lists and compare nodes to merge them in sorted order
Q21. What is sector? What is LCM
A sector is a portion of a circle enclosed by two radii and an arc. LCM stands for Least Common Multiple.
A sector is a part of a circle enclosed by two radii and an arc
The area of a sector can be calculated using the formula (θ/360) * π * r^2, where θ is the central angle and r is the radius
LCM is the smallest multiple that is divisible by two or more numbers
LCM is used in various mathematical calculations such as adding and subtracting fractions with different denominators
Q22. What are callbacks, Promises, async await
Callbacks, Promises, async await are asynchronous programming concepts in JavaScript.
Callbacks are functions passed as arguments to another function to be executed later.
Promises are objects representing the eventual completion or failure of an asynchronous operation.
async await is a syntax for writing asynchronous code that looks synchronous, making it easier to read and maintain.
Example: Using a callback to handle the result of an asynchronous API call.
Example: Creating a P...read more
Q23. Design a recommendation system which can help in developer ranking for jobs
Develop a recommendation system for ranking developers for job positions.
Collect data on developer skills, experience, projects, and job preferences
Use collaborative filtering to recommend job positions based on similar developers
Implement content-based filtering to recommend jobs based on developer skills and preferences
Utilize machine learning algorithms to continuously improve recommendations
Consider incorporating feedback from developers and employers to enhance the syste...read more
Q24. How to optimise React
Optimising React involves code splitting, lazy loading, using PureComponent, avoiding unnecessary re-renders, and using memoization.
Use code splitting to load only necessary components
Implement lazy loading for components that are not immediately needed
Utilize PureComponent to prevent unnecessary re-renders
Avoid unnecessary re-renders by using shouldComponentUpdate or React.memo
Use memoization techniques like useMemo or useCallback for expensive computations
Q25. What's the difference between Class and Struct
Classes are reference types, while structs are value types in Swift.
Classes are reference types, meaning they are passed by reference, while structs are value types, passed by value.
Classes support inheritance, while structs do not.
Classes have deinitializers, while structs do not.
Classes can have reference counting for memory management, while structs do not.
Example: Class - Person, Struct - Point
Q26. What is useRef hook used for?
useRef hook is used to persist a mutable value across renders without causing a re-render.
Used to store mutable values that do not trigger re-renders.
Commonly used for accessing DOM elements or storing previous values.
Does not cause a re-render when the value changes.
Q27. What is a callback?
A callback is a function that is passed as an argument to another function and is executed after the completion of that function.
Callbacks are commonly used in asynchronous programming to handle tasks that take time to complete.
They allow for functions to be executed once a certain task is completed, without blocking the rest of the code.
Example: setTimeout function in JavaScript takes a callback function as an argument to be executed after a specified time.
Q28. What is ARC and what's retain count
ARC stands for Automatic Reference Counting, a memory management system used in iOS development. Retain count is the number of references to an object.
ARC is a memory management system in iOS that automatically tracks and manages memory usage.
Retain count is the number of strong references to an object, which determines when the object should be deallocated.
When an object's retain count reaches 0, it is deallocated from memory to free up resources.
ARC helps prevent memory lea...read more
Q29. Convert decimal number to binary representation
Convert decimal number to binary representation using division and remainder method.
Start by dividing the decimal number by 2 and noting down the remainder.
Continue dividing the quotient by 2 until the quotient is 0.
The remainders obtained in reverse order will give the binary representation.
Q30. Explain market research type
Market research types include primary research, secondary research, qualitative research, quantitative research, and exploratory research.
Primary research involves collecting data directly from the source, such as surveys, interviews, and observations.
Secondary research involves analyzing existing data sources, such as reports, articles, and databases.
Qualitative research focuses on understanding attitudes, behaviors, and motivations through open-ended questions and observati...read more
Q31. Explain database type
Database type refers to the structure and organization of data within a database system.
Database types include relational, NoSQL, object-oriented, and hierarchical databases.
Relational databases store data in tables with rows and columns, using SQL for querying.
NoSQL databases are non-relational and can store unstructured data, such as MongoDB or Cassandra.
Object-oriented databases store data as objects, with attributes and methods.
Hierarchical databases organize data in a tr...read more
Q32. Different design patterns in Go Lang
Go Lang supports various design patterns like Singleton, Factory, Observer, etc.
Singleton pattern ensures a class has only one instance and provides a global point of access. Example: sync.Once in Go.
Factory pattern creates objects without specifying the exact class to create. Example: encoding/json package in Go.
Observer pattern defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated. Example: channe...read more
Q33. What is git grep
git grep is a command in Git that allows you to search through the contents of files in a Git repository.
Allows searching through the contents of files in a Git repository
Similar to the 'grep' command in Unix/Linux
Can be used to search for specific strings or patterns in files
Useful for finding references to functions, variables, or text within the codebase
Q34. What is profilers
Profilers are tools used to analyze the performance of software applications by measuring various metrics such as CPU usage, memory usage, and execution time.
Profilers help identify bottlenecks and optimize code for better performance.
Examples of profilers include VisualVM, YourKit, and Xcode Instruments.
Profiling can be done for different aspects of an application, such as CPU profiling, memory profiling, and network profiling.
Q35. Guesstimate - red cars in delhi
There are approximately 20% of cars in Delhi that are red.
Delhi has a high population density and traffic congestion, leading to a higher number of cars on the road.
Red is a popular color choice for cars in India, especially for luxury and sports cars.
Based on national statistics, around 20% of cars in India are red, so a similar percentage can be assumed for Delhi.
Q36. What is a recursive function
A recursive function is a function that calls itself within its definition.
A recursive function must have a base case to prevent infinite recursion.
Recursion can be used to solve problems that can be broken down into smaller, similar subproblems.
Example: Factorial calculation using recursion: def factorial(n): return 1 if n == 0 else n * factorial(n-1)
Q37. Diameter of a circle
The diameter of a circle is a straight line passing through the center of the circle and connecting two points on the circumference.
The diameter is always twice the length of the radius of the circle.
The formula to calculate the diameter of a circle is: diameter = 2 * radius
For example, if the radius of a circle is 5 cm, the diameter would be 10 cm.
Q38. Radius of a circle
The radius of a circle is the distance from the center of the circle to any point on its circumference.
The radius is half the diameter of the circle.
It is a constant distance from the center to any point on the circle.
The formula to calculate the circumference of a circle using the radius is 2 * pi * radius.
The formula to calculate the area of a circle using the radius is pi * radius^2.
Q39. abut previous experinces
I have over 5 years of experience in marketing, including developing and implementing successful campaigns for various products and services.
Managed social media accounts and increased engagement by 30%
Created email marketing campaigns that resulted in a 20% increase in sales
Collaborated with sales team to develop targeted marketing strategies
Top HR Questions asked in null
Interview Process at null
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month