A.P.T. Portfolio
Khosla Profil Interview Questions and Answers
Q1. Pair Sum Problem Statement
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.
Note:
Each pa...read more
Q2. Lexicographically Smallest Array Problem Statement
You are given an array ARR
of 'N' integers and a positive integer 'K'.
Your task is to determine the lexicographically smallest array that can be obtained by p...read more
Q3. Longest Common Prefix Problem Statement
You are given an array ‘ARR’ consisting of ‘N’ strings. Your task is to find the longest common prefix among all these strings. If there is no common prefix, you have to ...read more
Q4. Rotting Oranges Problem Statement
You are given a grid containing oranges where each cell of the grid can contain one of the three integer values:
- 0 - representing an empty cell
- 1 - representing a fresh orange...read more
Q5. K-th Largest Number in a BST
Given a binary search tree (BST) consisting of integers and containing 'N' nodes, your task is to find and return the K-th largest element in this BST.
If there is no K-th largest e...read more
Q6. Evaluate Division Problem Statement
Given an array of pairs of strings equations
representing a fraction and an array of real numbers values
. Each element in equations
denotes a fraction with the first string a...read more
Q7. Peak Element Finder
For a given array of integers arr
, identify the peak element. A peak element is an element that is greater than its neighboring elements. Specifically, if arr[i]
is the peak, then both arr[i...read more
Q8. How to make a fair game out of an unfair die that shows heads with a prob p
To make a fair game out of an unfair die showing heads with probability p, we can introduce a penalty for rolling heads.
Introduce a penalty for rolling heads, such as losing a point or skipping a turn.
Adjust the game rules to account for the unfair die, ensuring that the penalty balances out the advantage of rolling heads.
Consider incorporating strategic elements or decision-making to mitigate the impact of the unfair die on the game's fairness.
Q9. Design a Time Series Database
A time series database stores data points with timestamps for efficient retrieval and analysis.
Choose a suitable data model for the database
Use a time-based partitioning scheme for efficient data retrieval
Implement compression techniques to reduce storage requirements
Support for querying and analyzing time-based data
Ensure data consistency and durability
Consider scalability and high availability
Examples: InfluxDB, TimescaleDB, OpenTSDB
Interview Process at Khosla Profil
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month