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

Block or report jce200

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
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. 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
    
                  
  3. 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;