Map [1]
Operation | Time Complexity |
---|---|
Access | O(log n) |
Search | O(log n) |
Insertion | O(n) for <= 32 elements, O(log n) for > 32 elements [2] |
Deletion | O(n) for <= 32 elements, O(log n) for > 32 elements |
.git | |
.gitignore | |
# Created by https://www.gitignore.io/api/git,ruby,rails,jetbrains+all | |
# Edit at https://www.gitignore.io/?templates=git,ruby,rails,jetbrains+all | |
### Git ### | |
# Created by git for backups. To disable backups in Git: | |
# $ git config --global mergetool.keepBackup false | |
*.orig |
#!/bin/sh | |
# Userland mode (~$USER/), (~/). | |
# ~/.fonts is now deprecated and that | |
#FONT_HOME=~/.fonts | |
# ~/.local/share/fonts should be used instead | |
FONT_HOME=~/.local/share/fonts | |
echo "installing fonts at $PWD to $FONT_HOME" | |
mkdir -p "$FONT_HOME/adobe-fonts/source-code-pro" |
puts "練習 1:請印出從 1 到 100 之間所有的單數。" | |
puts " # Ans. 1.1" | |
(1..100).each do |i| | |
p i if i.odd? | |
end | |
p "======================================" | |
puts " # Ans. 1.2" | |
p [*1..100].select { |i| i.odd? } | |
p "======================================" |
#!/usr/bin/env ruby | |
# You can skip this bit if you wish - you will need the 'ruby-trello' gem installed, and | |
# optionally, 'foreman' to run the script with. | |
require 'bundler/setup' | |
Bundler.require | |
require 'trello' | |
require 'csv' |