Leetcode 1679 | Max number of k-sum pairs | 13th from LC 75 | 90 days SE prep

Поділитися
Вставка
  • Опубліковано 12 вер 2024
  • Question Details - • DSA Phir se with Sumee...
    My instagram - / sms_pec
    Scaler School of Technology Link - bit.ly/sst-fro...
    About the Video -
    I am simulating a scenario to create content. I will be preparing for a SE job across the next 90 days or so, till Mar 31 2024. I have created a preparation plan for that. Let's do it together.
    This is 13th from Leetcode 75
    Question number is Leetcode 1679.
    Question name is "Max number of k-sum pairs"
    Don't forget to share your progress with me here - / @sumeet1188
    I am doing the following work these days
    1. DSA Phir se: • DSA Phir se with Sumeet
    2. Dream and Build with Sumeet: / @dnb-with-sumeet
    3. JEE Prep: / @sumeet-malik-for-11th...
    4. Powerlifting: / sms_pec
    5. Journal of progress:
    / @sumeet1188
    My instagram, linkedin and twitter are also pretty interesting.
    LinkedIn: / sumeet-malik-ab650410
    Twitter: / sumeetmalik17
    Instagram: / sms_pec
    Lift weights. Be Curious. Dream and Build,
    Sumeet

КОМЕНТАРІ • 5

  • @rajeevkumargupta532
    @rajeevkumargupta532 8 місяців тому

    class Solution {
    public int maxOperations(int[] nums, int k) {
    int ans=0;
    Arrays.sort(nums);
    int fi=0;
    int li=nums.length-1;
    while(fi

  • @shantanusingh7423
    @shantanusingh7423 4 місяці тому

    sir the way u explain , outstanding

  • @utkarshsinghchouhan8819
    @utkarshsinghchouhan8819 8 місяців тому

    great explanation sir 🫡

  • @brajeshmohanty2558
    @brajeshmohanty2558 7 місяців тому

    bhai naya video kab ayega

  • @dayashankarlakhotia4943
    @dayashankarlakhotia4943 8 місяців тому

    public int maxOperations (int[]nums,int k){
    Mapmpp=new HashMap();
    int cnt=0;
    for(int i=0;i0){
    cnt++;
    mpp.put(k-nums[i],mpp.get(k-nums[i])-1);
    }else {
    mpp.put(nums[i],mpp.getOrDefault(nums[i],0)+1);
    }
    }
    return cnt;
    }
    }
    Tc=0(n);
    SC=0(n);