Stock Buy Sell Position Indicator
Asked at Hudson River Trading · Coding Questions · Difficulty: Medium
Given a sequence of integer prices, decide when to buy and sell by identifying special sequences of price movements called **indicators**. Represent a price increase as `1` and a price decrease as `-1`. For example `buyIndicator = [1, 1]` means buy after two consecutive increases; `sellIndicator = [-1, -1, 1]` means sell after two decreases then an increase.
Loading the problem…
More Hudson River Trading interview questions
- Buffer Readers for char/int/string with Pointer Advancement
- Heart Disease Prediction — EDA and Modeling
- Implement a Coroutine Step by Step
- C++ Template Wrapper over std::map and std::unordered_map
- Implement Modify in an Order Management System (Codebase Extension)
- Count Fancy Numbers