Selecting Stocks
Asked at Snowflake · Coding & Leetcode-style Questions · Difficulty: Medium
An investor has saved some money and wants to invest in the stock market. There are a number of stocks to choose from, and they want to buy at most 1 share in any company. The total invested cannot exceed the funds available. A friend who is a stock market expert has predicted the values of each stock after 1 year. Determine the maximum profit that can be earned at the end of the year assuming the predictions come true.
Loading the problem…
More Snowflake interview questions
- Design a Distributed Job Scheduler with Cron, Pause, Resume
- SET Card Game: Validate a Triple and List All Sets on the Table
- Design an ACL Authorization Service
- Design an S3-Style Blob Store with Deduplication
- Boundary of Binary Tree
- SQL: Project Duration & Budget per Employee