Skip to content
View jce200's full-sized avatar
🏂
🏂

Block or report jce200

Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. Check whether array A is a permutation. Check whether array A is a permutation.
    1
    function solution(A) {
    2
     let N = A.length;
    3
     if (N === new Set(A).size) {
    4
     let summ = (N * (N + 1)) / 2;
    5
     let aSumm = A.reduce((a, b) => a + b);
  2. react-spotify react-spotify Public

    Forked from Arts-Archives/react-spotify

    a react app connected to the spotify web api

    CSS

  3. PermMissingElem PermMissingElem
    1
    // Find the missing element in a given permutation.
    2
     
    3
    // An array A consisting of N different integers is given.
    4
    // The array contains integers in the range [1..(N + 1)], which means that exactly one element is missing.
    5
     
  4. Minimize the value |(A[0] + ... + A[... Minimize the value |(A[0] + ... + A[P-1]) - (A[P] + ... + A[N-1])|.
    1
    function solution(A) {
    2
     let min = Infinity;
    3
     const total = A.reduce((a, b) => a + b);
    4
     
    5
     let left = 0;