" First, sort the array in ascending order. This ensures that we can easily check the triangle inequality condition. Use a loop to iterate through the array. For each triplet of consecutive elements, check if they satisfy the triangle inequality condition a+b>ca+b>c. As soon as you find a valid tuple, return it. If no valid tuple is found, return null. This approach is efficient with a time complexity of O(nlogn)O(nlogn) due to the sorting step, followed by a linear scan of the array"
Shivam P. - " First, sort the array in ascending order. This ensures that we can easily check the triangle inequality condition. Use a loop to iterate through the array. For each triplet of consecutive elements, check if they satisfy the triangle inequality condition a+b>ca+b>c. As soon as you find a valid tuple, return it. If no valid tuple is found, return null. This approach is efficient with a time complexity of O(nlogn)O(nlogn) due to the sorting step, followed by a linear scan of the array"See full answer
Machine Learning Engineer
Data Structures & Algorithms
+1 more
🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.
"This is another Fermi problem — an estimation or approximation problem with limited information and back-of-the-envelope calculations. There's no right answer: interviewers want to understand how you think and how well you can explain your reasoning, rather than what you already know.
Recall the formula for Fermi problems:
Ask clarifying questions
Catalog what you know
Make equation(s)
Think about edge cases to add to equation
**Breakdown components of your"
Exponent - "This is another Fermi problem — an estimation or approximation problem with limited information and back-of-the-envelope calculations. There's no right answer: interviewers want to understand how you think and how well you can explain your reasoning, rather than what you already know.
Recall the formula for Fermi problems:
Ask clarifying questions
Catalog what you know
Make equation(s)
Think about edge cases to add to equation
**Breakdown components of your"See full answer
"I try to solve this initially using quick select where will take a pivot element and position the remaining elements and check if the current index is answer or not and continue the same but it requires o(n*n), but interviewee is expecting the best from me, so at the end i tried solving using heaps where will check the difference between k and n-k to use min or max heap after that we will heap the array, and will keep popping the element k-1 and return the peek one which leads to answer."
Mourya C. - "I try to solve this initially using quick select where will take a pivot element and position the remaining elements and check if the current index is answer or not and continue the same but it requires o(n*n), but interviewee is expecting the best from me, so at the end i tried solving using heaps where will check the difference between k and n-k to use min or max heap after that we will heap the array, and will keep popping the element k-1 and return the peek one which leads to answer."See full answer
"Best resource with whom I have worked in the past was Head of Design. The best attributes were, he was not only a great craftsman when it came to Design details or understanding user needs, but was super quick to understand business challenges."
Devi K. - "Best resource with whom I have worked in the past was Head of Design. The best attributes were, he was not only a great craftsman when it came to Design details or understanding user needs, but was super quick to understand business challenges."See full answer
"This is a classic Strategy Question, which asks you to justify high-level business decisions and strategy. With many acquisition strategy questions, we can first look at core competencies and synergies before offering more complex reasoning.
> WeWork had one of the most disastrous IPOs in recent history in 2019. Some reasons why it failed were:A flawed business model
> Poor leadership
> Poor space optimization
> I'll go into detail about each. Feel free to let me know if you want me to dive"
Exponent - "This is a classic Strategy Question, which asks you to justify high-level business decisions and strategy. With many acquisition strategy questions, we can first look at core competencies and synergies before offering more complex reasoning.
> WeWork had one of the most disastrous IPOs in recent history in 2019. Some reasons why it failed were:A flawed business model
> Poor leadership
> Poor space optimization
> I'll go into detail about each. Feel free to let me know if you want me to dive"See full answer
"This is an Improve a Product question. Let's first go over the Improve a Product formula:
Ask clarifying questions
Identify users, behaviors, and pain points
State product goal
Brainstorm small improvements
Brainstorm bolder improvements
Measure success
Summarize
Now, let's begin!
Ask clarifying questions
Before we begin listing off recommendations, it's important you ask questions to ensure you and the interviewer are on the same page"
Exponent - "This is an Improve a Product question. Let's first go over the Improve a Product formula:
Ask clarifying questions
Identify users, behaviors, and pain points
State product goal
Brainstorm small improvements
Brainstorm bolder improvements
Measure success
Summarize
Now, let's begin!
Ask clarifying questions
Before we begin listing off recommendations, it's important you ask questions to ensure you and the interviewer are on the same page"See full answer