Ai Software Engineer Interview Questions

6,029 ai software engineer interview questions shared by candidates

1. Highly Profitable Months The stocks of a company are being surveyed to analyze the net profit of the company over a period. For an analysis parameter � k, an interval of � k consecutive months is said to be highly profitable if the values of the stock prices are strictly increasing for those months. Given the stock prices of the company for � n months and the analysis parameter � k, find the number of highly profitable intervals. Example stockPrices = [5, 3, 5, 7, 8] � = 3 k=3 These are the intervals of � k months in which the stock prices are strictly increasing: [Visual representation of the intervals in a bar graph] Hence the answer is 2. Note: If the interval length is 1, each subarray of length 1 is highly profitable The problem statement in the image is as follows: 2. Rearranging a Word Given word, return the next alphabetically greater string in all permutations of that word. If there is no greater permutation, return the string 'no answer' instead. Example word = 'baca' The string 'baca' has the following permutations in alphabetical order: 'aabc', 'aacb', 'abac', 'abca', 'acab', 'acba', 'baac', 'baca', 'bcaa', 'caab', 'caba', and 'cbaa'. The next alphabetically greater permutation of the original string is 'bcaa'. Function Description Complete the function rearrangeWord in the editor, rearrangeWord has the following parameter(s): string word: the string to analyze Returns string: Return the next alphabetically greater permutation of the string. If no such string exists, return the string 'no answer'.
avatar

Associate AI/ML Data Scientist

Interviewed at JPMorganChase

3.9
Nov 30, 2023

1. Highly Profitable Months The stocks of a company are being surveyed to analyze the net profit of the company over a period. For an analysis parameter � k, an interval of � k consecutive months is said to be highly profitable if the values of the stock prices are strictly increasing for those months. Given the stock prices of the company for � n months and the analysis parameter � k, find the number of highly profitable intervals. Example stockPrices = [5, 3, 5, 7, 8] � = 3 k=3 These are the intervals of � k months in which the stock prices are strictly increasing: [Visual representation of the intervals in a bar graph] Hence the answer is 2. Note: If the interval length is 1, each subarray of length 1 is highly profitable The problem statement in the image is as follows: 2. Rearranging a Word Given word, return the next alphabetically greater string in all permutations of that word. If there is no greater permutation, return the string 'no answer' instead. Example word = 'baca' The string 'baca' has the following permutations in alphabetical order: 'aabc', 'aacb', 'abac', 'abca', 'acab', 'acba', 'baac', 'baca', 'bcaa', 'caab', 'caba', and 'cbaa'. The next alphabetically greater permutation of the original string is 'bcaa'. Function Description Complete the function rearrangeWord in the editor, rearrangeWord has the following parameter(s): string word: the string to analyze Returns string: Return the next alphabetically greater permutation of the string. If no such string exists, return the string 'no answer'.

Stats: 1: There are 25 mechanical horses and a single racetrack. Each horse completes the track in a pre-programmed time, and the horses all have different finishing times, unknown to you. You can race 5 horses at a time. After a race is over, you get a printout with the order the horses finished, but not the finishing times of the horses. What is the minimum number of races you need to identify the fastest 3 horses? 2: What is the probability of passing through a node in a directed graph Math questions: 1: Given the correlation C(A,B) and C(B,C), what is the C(A,C). Ml questions: 1: Explain how neural networks work? 2: Three solutions to solve the high variance low bias problem? 3: Explain backpropagation and the mathematical explanation of it. 4: Why CNNs works well for computer vision. 5: Random forest 6: The difference between KNN and K-mean.
avatar

AI Scientist

Interviewed at J.P. Morgan

3.9
Oct 29, 2021

Stats: 1: There are 25 mechanical horses and a single racetrack. Each horse completes the track in a pre-programmed time, and the horses all have different finishing times, unknown to you. You can race 5 horses at a time. After a race is over, you get a printout with the order the horses finished, but not the finishing times of the horses. What is the minimum number of races you need to identify the fastest 3 horses? 2: What is the probability of passing through a node in a directed graph Math questions: 1: Given the correlation C(A,B) and C(B,C), what is the C(A,C). Ml questions: 1: Explain how neural networks work? 2: Three solutions to solve the high variance low bias problem? 3: Explain backpropagation and the mathematical explanation of it. 4: Why CNNs works well for computer vision. 5: Random forest 6: The difference between KNN and K-mean.

Viewing 5461 - 5470 interview questions

Glassdoor has 6,029 interview questions and reports from Ai software engineer interviews. Prepare for your interview. Get hired. Love your job.