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;
@aborruso
aborruso / create-new-file.ahk
Created March 30, 2019 10:14 — forked from diastremskii/create-new-file.ahk
AutoHotKey: Create a new file with Alt+N keyboard shortcut in Windows Explorer
; This is part of my AutoHotKey [1] script. When you are in Windows Explorer it
; allows you to press Alt+N and type a filename, and that file is created
; in the current directory and opened in the appropriate editor (usually
; [gVim](http://www.vim.org/) in my case, but it will use whatever program is
; associated with the file in Windows Explorer).
; This is much easier than the alternative that I have been using until now:
; Right click > New > Text file, delete default filename and extension (which
; isn't highlighted in Windows 7), type the filename, press enter twice.
; (Particularly for creating dot files like ".htaccess".)