Interview DigestInterview Digest

OA Practice Workspace

Technical2026-09-29

Solve the stock buy and sell problem and implement a function to move all zeroes in an array to the left side.

AI-Expanded — inferred from the question title, not from the original candidate report

Given an array of integers representing daily stock prices, calculate the maximum profit achievable by completing at least one buy-and-sell transaction, where you must buy before you sell. Additionally, implement an in-place function that rearranges an array of integers by moving all occurrences of zero to the left side while maintaining the relative order of the non-zero elements.

Context & Summary

The candidate was asked to solve two algorithmic coding problems during the technical interview.

💻 Coding practice works best on desktop.
Code editors are too cramped on mobile screens.