Skip to content

Instantly share code, notes, and snippets.

View abdivasiyev's full-sized avatar

Asliddinbek Azizovich abdivasiyev

View GitHub Profile
@abdivasiyev
abdivasiyev / selection_sort.go
Created April 17, 2022 21:27
Selection sort algorithm implementation
package sorting
// Selection sorts given list
func Selection(list []int) []int {
// return list if empty or has single element
if len(list) <= 1 {
return list
}
// iterate list elements
@abdivasiyev
abdivasiyev / bubble_sort.go
Last active February 26, 2022 20:59
Bubble sorting implementation golang
package sorting
// Bubble sorts the given slice of integers in ascending order with bubble sort algorithm.
func Bubble(numbers []int) {
size := len(numbers)
for i:=0; i<size; i++ {
for j:=0; j<i; j++ {
if numbers[j] > numbers[i] {
numbers[j], numbers[i] = numbers[i], numbers[j]
@abdivasiyev
abdivasiyev / latest-protobuf-ubuntu-18-04.md
Created July 30, 2021 21:23 — forked from diegopacheco/latest-protobuf-ubuntu-18-04.md
How to Install Latest Protobuf on Ubuntu 18.04
sudo apt-get install autoconf automake libtool curl make g++ unzip -y
git clone https://github.com/google/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
make
make check
sudo make install
sudo ldconfig