Skip to content

Instantly share code, notes, and snippets.

@bbrother92
bbrother92 / 19.md
Created July 25, 2022 21:41 — forked from rusdevops/19.md

XIX Задача о поиске элемента ⭐⭐

Дан упорядоченный массив чисел размером N Нужно реализовать алгоритм поиска вхождения упорядоченного подмассива размера M, где M << N

func isInclude(array int[], subarray []int) bool

assert(isInclude([1, 2, 3, 5, 7, 9, 11], []) == true) 
assert(isInclude([1, 2, 3, 5, 7, 9, 11], [3, 5, 7]) == true) 
@bbrother92
bbrother92 / cheatsheet.py
Created December 3, 2017 00:30 — forked from fuyufjh/cheatsheet.py
My Python Cheatsheet
Python Cheatsheet
=================
################################ Input & Output ###############################
name = input('please enter your name: ')
print('hello,', name)
ageStr = input('please enter your age: ')
age = int(ageStr)
#!/usr/bin/env python
"""Basic Python Cheat Sheet by Filip Kral on 2015/02/16"""
"""
Python is a cross-platform, interpreted, object-oriented programming language.
That means you can run it on Linux, Windows, Mac, and other platforms,
you don't need to compile your code to execute it because it is compiled on
the fly, and you can use classes and objects.
@bbrother92
bbrother92 / 0_reuse_code.js
Created November 26, 2016 06:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console