Skip to content

Instantly share code, notes, and snippets.

View rahulkhairwar's full-sized avatar
💭
🙇🏻‍♂️

Rahul Khairwar rahulkhairwar

💭
🙇🏻‍♂️
View GitHub Profile

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@diegopacheco
diegopacheco / latest-protobuf-ubuntu-18-04.md
Created June 7, 2018 20:13
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
@psayre23
psayre23 / gist:c30a821239f4818b0709
Last active March 9, 2026 09:44
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array