Skip to Content

Coding Interviews

Write a function to find the longest common prefix string amongst an array of strings.

If there is no common prefix, return an empty string "".

You are given an array prices where prices[i] is the price of a given stock on the ith day.

You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock.

Return the maximum profit you can achieve from this transaction. If you cannot achieve any profit, return 0.

Design a relational model for a calendar application. The application will support users adding events with a specific time and time zone. Reminders about upcoming events will be pushed to users and have the ability to invite other users to events.