Skip to content

Instantly share code, notes, and snippets.

View alexander-malafeev's full-sized avatar

Alexander Malafeev alexander-malafeev

  • Zürich, Switzerland
View GitHub Profile
@KirillLykov
KirillLykov / binary-search-workout.md
Last active July 24, 2024 18:30
Binary search workout

Problem 0

A sorted array was cyclicly shifted by unknown offset. Find min element. lc

Solution

    int findMin(vector<int>& nums) {
        if (nums.size() == 0) return 0;