Problem Description: You are standing on a unique diamond-shaped platform composed of 5 tiles. These tiles are positioned at coordinates: (-1,0), (0,-1), (0,0), (0,1), and (1,0). From a starting position (xs,ys), you make random moves in one of four directions: left (decrease x by 1), right (increase x by 1), up (increase y by 1), or down (decrease y by 1). Each direction has the same probability and the direction of each move is entirely independent of previous moves. Determine the probability that you can reach a given destination (xe,ye) without stepping off the diamond platform. Constraints: (xs, ys) must be one of: (-1,0), (0,-1), (0,0), (0,1), (1,0) (xe, ye) must also be one of the above coordinates. Starting and ending coordinates are distinct: xs != xe or ys != ye Input: A single line containing four integers, denoting xs, ys, xe, ye respectively. Output: A single line showing the probability that you'll reach the destination before stepping off the platform. Sample input: -1 0 0 0 Sample Output: 0.25 Explanation: From the starting position, you have a 25% chance of moving right (and thus reaching the destination). Any other move would result in falling off the platform. [execution time limit] 4 seconds (py3) [memory limit] 1 GB [input] integer xs The x-coordinate of the starting position. [input] integer ys The y-coordinate of the starting position. [input] integer xe The x-coordinate of the end position. [input] integer ye The y-coordinate of the end position. [output] float Probability to reach end position before falling of platform.
Sr Data Scientist Interview Questions
3,383 sr data scientist interview questions shared by candidates
typical problems from a leetcode (not data science)
Describe how to select a limited number of cereals brands among 100 cereals brands for a Tesco express
Stats questions based on probability
Coding questions with prob and optimization
Comparision of linear and non-linear models, evaluation metrics, high-level concepts on data mining algos.
SQL, machine learning related questions
Focus on my projects, AWS knowledge, data science and ML basics
SVD, forecasting, vanishing gradients, finding missing element in array, string manipulation
Complejidad de distintos algoritmos de sorting.
Viewing 2761 - 2770 interview questions
See Interview Questions for Similar Jobs
Jr Data ScientistData Scientist TraineeData Science EngineerSenior Machine Learning ScientistApplied Research ScientistSenior Data ScientistMachine Learning Research EngineerData Scientist NlpMachine Learning Research ScientistSenior Machine Learning EngineerData SciencesMachine Learning ScientistSoftware Engineer Machine Learning ScientistNlp Data ScientistResearch Scientist Computer VisionApplied ScientistSr. Data ScientistSenior Quantitative Researcher