Big Theta Notation: Actual complexity. Big O Notation: Worst case complexity. Big Omega notation: Best ase complexity.
- Constant: O(1)
- Linear: O(N)
- One nested loop: O(N^2)
- Binary Tree Search: O(Log N)
- Simple recursive function: O(N)
{ | |
"type": "single_type", | |
"id": "weclome", | |
"data": { | |
"copy": "Hi Sofie, your Value\nis $625.22", | |
"copy_highlight": ["625.22"], | |
"tooltip": { | |
"title": "Your Value", | |
"content": "Aggregate value of all accounts" | |
} |
{ | |
"type": "single_type", | |
"id": "snapshot", | |
"data": { | |
"invest": { | |
"title": "Personal", | |
"value": 12673, | |
"accounts": [ | |
{ | |
"title": "’", |
[ | |
{ | |
"type": "single_type", | |
"id": "snapshot", | |
"data": { | |
"personal": { | |
"title": "Personal", | |
"balance": "$294.02", | |
"info": "Next milestone: $500", | |
"percentages": [ |
trait Vehicle { | |
def drive = { | |
println("drive vehicle") | |
} | |
} | |
trait Boat extends Vehicle { |
/* INTERFACES */ | |
interface Plane { | |
default void drive() { | |
System.out.println("We are driving a plane!"); | |
} | |
} |
// REQUESTVAlIDATORS | |
trait RequestValidator { | |
def Validate(): Boolean // various approaches to validating http requests | |
} | |
// AUTHPOLICIES | |
trait AuthPolicy { | |
def Authorize() // handle user context and various exceptions | |
} |
import play.api.libs.json._ | |
import play.api.libs.json.Reads._ | |
import play.api.libs.functional.syntax._ | |
case class GlobalConfig(defaultAge: Int) | |
val config = GlobalConfig(34) | |
case class Person(name: String, age: Int) | |
object Person { |
/* | |
To run locally... | |
$> npm install mocha -g | |
$> mocha bastille.spec.js | |
*/ | |
"use strict"; | |
var assert = require("assert"); | |
var Bastille = function (){ |
...