350. Intersection of Two Arrays II | hashing | leetcode daily challenge | DSA | Hindi

Поделиться
HTML-код
  • Опубликовано: 22 авг 2024
  • Problem Name:
    350. Intersection of Two Arrays II
    Problem Statement:
    Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must appear as many times as it shows in both arrays and you may return the result in any order.
    Problem link:
    leetcode.com/p...
    Java Plus DSA Placement Course Playlist:
    • Java and DSA Course Pl...
    Java Plus DSA Sheet:
    docs.google.co...
    Notes:
    github.com/Tiw...
    Telegram Link:
    shashwattiwari...
    Ultimate Recursion Series Playlist:
    • Recursion and Backtrac...
    Instagram Handle: (@shashwat_tiwari_st)
    shashwattiwari...
    Samsung Interview Experience:
    • I cracked Samsung | SR...
    Company Tags:
    Facebook | Amazon | Microsoft | Netflix | Google | LinkedIn | Pega Systems | VMware | Adobe | Samsung
    Timestamp:
    0:00 - Introduction
    #ShashwatTiwari #coding​​ #problemsolving​

Комментарии • 6

  • @Elitevisioner
    @Elitevisioner Месяц назад +1

    Best ever..move ahead sir complete full java along with advance...because no one is providing java playlist...everyone go towards c++

  • @RohitKumar-dz8dh
    @RohitKumar-dz8dh Месяц назад +1

    Thanks 😊

  • @PiyushSharma-we8yd
    @PiyushSharma-we8yd Месяц назад

    maine aapse pehle seekha tha intersection of two arrays 1 toh mujhse aaj ka khud hi ban gya tha bhaiya😍

  • @codingwave56
    @codingwave56 Месяц назад

    Good Explanation 👏🏻

  • @dibbodas4116
    @dibbodas4116 Месяц назад

    class Solution {
    public:
    vector intersect(vector& nums1, vector& nums2) {
    int arr[1001] = {0};
    vectorans;
    for(int a:nums1) arr[a]++;
    for(int b:nums2)
    {
    if(arr[b]>0)
    {
    ans.push_back(b);
    arr[b]--;
    }
    }
    return ans;
    }
    };
    time O(n) space O(1)

  • @Ashwinmahajan-ld6qt
    @Ashwinmahajan-ld6qt Месяц назад

    bhai please apni DSA wali series continue kro na...