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
function findSomePair(arr, sum) { | |
arr = arr || []; | |
sum = sum || 0; | |
let outs = {}, | |
map = new Map(); | |
if (arr.length <= 1) { | |
outs["pairElementIndex1"] = -1; |
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
#include <iostream> | |
#include <iomanip> | |
#include <cstring> | |
#include <cstdlib> | |
#include <unordered_map> | |
using namespace std; | |
void findSomePair(int* arr, int arrSize, int sum, int* pairElementIndex1, int* pairElementIndex2); | |
void testFindSomePair(); | |
void reverse(char* arr, int start, int end); |
NewerOlder