Skip to content

Instantly share code, notes, and snippets.

const target = 486;
const nums = [3, 3, 6, 8, 9, 100];
const op = [['+', (a, b) => a + b], ['-', (a, b) => a - b], ['*', (a, b) => a * b], ['/', (a, b) => a / b]];
let numSolutions = 0;
let bestSolution;
function solve(nums, solution) {
for (let i = 0; i < nums.length; i++) {
@Inferis
Inferis / ViewController.swift
Last active December 1, 2019 23:27
Beginnings of a GCD wrapper in swift
import UIKit
import QuartzCore
class ViewController: UIViewController {
@IBOutlet weak var label: UILabel
@IBOutlet weak var counter: UILabel
override func viewDidLoad() {
super.viewDidLoad()