---
id: TASK-23
title: 'Разбор задачи: Best Time to Buy and Sell Stock (Greedy)'
status: Done
assignee:
  - '@assistant'
created_date: '2026-09-10 07:50'
updated_date: '2026-09-10 08:36'
labels: []
dependencies: []
references:
  - applications/yandex-codenv/algo-solutions/_template.md
priority: high
type: task
ordinal: 23000
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Файл: algo-solutions/greedy/01-best-time-to-buy-and-sell-stock.md
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 Файл создан со всеми секциями формата
<!-- AC:END -->

## Implementation Plan

<!-- SECTION:PLAN:BEGIN -->
1. Read template and reference tasks for format\n2. Check algo-stage-prep.md for problem key points\n3. Create applications/yandex-codenv/algo-solutions/greedy/01-best-time-to-buy-and-sell-stock.md following the template\n4. Verify all acceptance criteria met
<!-- SECTION:PLAN:END -->

## Final Summary

<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Created applications/yandex-codenv/algo-solutions/greedy/01-best-time-to-buy-and-sell-stock.md with all 9 sections from template (frontmatter, condition, key idea, complexity, Ruby solution, trace, edge cases, common mistakes, alternatives table, notes). Verified by reading the file — all sections populated and formatted per template.
<!-- SECTION:FINAL_SUMMARY:END -->
