| Function | Shortcut |
|---|---|
| New Tab | ⌘ + T |
| Close Tab or Window | ⌘ + W (same as many mac apps) |
| Go to Tab | ⌘ + Number Key (ie: ⌘2 is 2nd tab) |
| Go to Split Pane by Direction | ⌘ + Option + Arrow Key |
| Cycle iTerm Windows | ⌘ + backtick (true of all mac apps and works with desktops/mission control) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // A function in JavaScript that accepts an array of integers and a number x as parameters, when invoked, returns an array of unique indices of two numbers whose sum is equal to x. | |
| // For example: [1, 3, 4, 5, 6, 8, 10, 11, 13], Sum: 14 | |
| // Pairs of indices: [0, 8], [1, 7], [2, 6], [4, 5] | |
| function pairSum(arr, x){ | |
| var pairs= []; | |
| var pairIndex = []; | |
| for (var i = 0; i < arr.length; i++) { | |
| for (var k = i+1; k < arr.length; k++) { | |
| if (arr[i]+arr[k]== x) { |