This file contains 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
#include <iostream> | |
#include <windows.h> | |
#define SLEEP 100 // 100 millis | |
using namespace std; | |
void throb(char in) | |
{ | |
cout << "\b" << in; |
This file contains 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
local shell = require("shell") | |
local args = shell.parse(...) | |
local result, reason | |
if #args == 0 then | |
result, reason = shell.setWorkingDirectory("/") | |
else | |
result, reason = shell.setWorkingDirectory(shell.resolve(args[1])) | |
end |
This file contains 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
class Solution { | |
public: | |
vector<int> twoSum(vector<int> &numbers, int target) { | |
vector<int> ans(2); | |
// Remember indexes | |
vector<int> sorted(numbers); | |
// Merge Sort [O(nlog(n))] | |
mergeSort(sorted); | |
for (int i = 0; i < numbers.size(); i++) { |