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 <array> | |
#include <map> | |
#include <random> | |
using std::cout; | |
using std::endl; | |
using std::string; | |
using std::array; |
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
function solution(A) { | |
var L = A.length; // Length of the array | |
var X = ((L + 1) * L) / 2; // Sum from 1..L | |
var Y = 0; // Sum of evaluated values | |
var I = 0; // Counter | |
var F = []; // Found elements | |
var V = -1; // Container | |
while (I < L) { // Start searching the array | |
V = A[I]; // Get the value |
NewerOlder