Python: Microsoft Interview Question

    8
    5



    Python: Microsoft Interview Question

    In this video, we will be solving an interview question that was asked by Microsoft.

    source

    Previous articleAzure DevOps Interview Questions with Practical Scenarios (PART-1) | Azure | AKS | CI | CD
    Next articleCertified Kubernetes Application Developer (CKAD): 7 Things You Must Learn

    5 COMMENTS

    1. oh I solved it :
      function ss(arr, key) {

      let subArrs = []

      for(i=0;i<arr.length;i++) {

      let subArr = []

      for(j=0;j<key;j++) if(arr[i+key-1]!= undefined) subArr.push(arr[i+j])

      subArr.sort((a, b) => a – b);

      if(subArr.length === key) subArrs.push(subArr)

      }

      return subArrs

      }