<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nilesh</title>
    <description>The latest articles on DEV Community by Nilesh (@nilesh_aggarwal).</description>
    <link>https://dev.to/nilesh_aggarwal</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F796279%2F836ca0e2-5a4c-40a1-8e29-8304083f814f.jpeg</url>
      <title>DEV Community: Nilesh</title>
      <link>https://dev.to/nilesh_aggarwal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nilesh_aggarwal"/>
    <language>en</language>
    <item>
      <title>AWS re:Invent 2024</title>
      <dc:creator>Nilesh</dc:creator>
      <pubDate>Tue, 10 Dec 2024 05:35:46 +0000</pubDate>
      <link>https://dev.to/nilesh_aggarwal/aws-reinvent-2024-4n6o</link>
      <guid>https://dev.to/nilesh_aggarwal/aws-reinvent-2024-4n6o</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;AWS re:Invent is the tech world’s grandest stage for cloud innovation. As a proud recipient of the All Builders Welcome Grant, I attended this year’s event in Las Vegas from December 4–6, 2024. This grant is designed for technologists early in their careers, providing an all-expenses-paid trip, including airfare, accommodation, and a conference pass.&lt;/p&gt;

&lt;p&gt;How to Apply for the ABW Grant&lt;br&gt;
Eligibility for the grant includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Having less than five years of experience in a cloud-related career.&lt;/li&gt;
&lt;li&gt;Demonstrating a keen interest in AWS technologies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Applications open in the summer and are shared on the AWS re:Invent website. Start early and craft a strong application showcasing your passion for cloud computing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Day-by-Day Highlights
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Day 1: Immersing in Innovation&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
The day began with insightful sessions on Cloud DevOps + AI and Physical AI, where futuristic AI integration ideas were discussed. A standout was the session on integrating Amazon Bedrock foundation models into serverless applications, followed by a Chalk Talk on AI-powered document workflows—both incredibly relevant to my professional interests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Day 2: Learning the Business Side&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
I attended the Technical Product Management meetup, which offered a behind-the-scenes view of how product managers thrive at Amazon. The emphasis on technical depth and cross-functional collaboration was inspiring.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Day 3: Personal Growth and Networking&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
This day was packed with opportunities for skill-building and career advice, including:&lt;br&gt;
An Observability Workshop, emphasizing effective monitoring in cloud environments.&lt;br&gt;
A Speed Mentoring Session and a Career Navigation Workshop with Amazon’s Solutions Architects and Developer Advocates, which were perfect for career insights.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways from the Event
&lt;/h2&gt;

&lt;p&gt;Networking Matters: The ABW lounge was a haven for connecting with other grant recipients and AWS mentors. Conversations here broadened my horizons.&lt;/p&gt;

&lt;p&gt;Knowledge is Power: Chalk Talks and workshops offered practical insights into cloud innovations.&lt;/p&gt;

&lt;p&gt;Be Authentic: Being open and approachable enhanced my interactions with attendees and speakers alike.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Experience as a Grantee
&lt;/h2&gt;

&lt;p&gt;The ABW grant was more than financial support—it was a gateway to community and mentorship. AWS went above and beyond with perks like professional headshots and networking events. The closing reception with AWS leadership was a moment of gratitude and reflection, emphasizing AWS’s commitment to diversity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Attending AWS re:Invent 2024 as an ABW grantee was transformative. The experience enriched my technical knowledge and professional network, reinforcing my drive to excel in cloud technologies. If you’re considering applying for the ABW grant, don’t hesitate—it’s a once-in-a-lifetime opportunity to learn, grow, and connect.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>machinelearning</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 4</title>
      <dc:creator>Nilesh</dc:creator>
      <pubDate>Fri, 18 Feb 2022 04:54:25 +0000</pubDate>
      <link>https://dev.to/nilesh_aggarwal/day-4-586p</link>
      <guid>https://dev.to/nilesh_aggarwal/day-4-586p</guid>
      <description>&lt;p&gt;Well today was a very longgg day, I had:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1 long 10 hour shift from 8:00 AM till 6:00 PM&lt;/li&gt;
&lt;li&gt;Right after my shift, I had to rush to my Applied Artificial Intelligence course COMP-6721 which was till 8:15 PM&lt;/li&gt;
&lt;li&gt;And then I had a lab under the same course till 10:20 PM
Damnn...
I am really tired up right now, but equally psyched to share and re-comprehend what I learned today in my lecture and also to share some personal insights ;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;COMP-6721-Applied Artificial Intelligence:&lt;/p&gt;

</description>
    </item>
    <item>
      <title>LeetCode: Plus One Solution</title>
      <dc:creator>Nilesh</dc:creator>
      <pubDate>Wed, 16 Feb 2022 15:33:08 +0000</pubDate>
      <link>https://dev.to/nilesh_aggarwal/leetcode-plus-one-solution-496m</link>
      <guid>https://dev.to/nilesh_aggarwal/leetcode-plus-one-solution-496m</guid>
      <description>&lt;p&gt;Okay fellas, &lt;/p&gt;

&lt;p&gt;Let's get on to some coding problems now!!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem Statement:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You are given a large integer represented as an integer array digits, where each digits[i] is the ith digit of the integer. The digits are ordered from most significant to least significant in left-to-right order. The large integer does not contain any leading 0's.&lt;/p&gt;

&lt;p&gt;Increment the large integer by one and return the resulting array of digits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 1:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Input: digits = [1,2,3]&lt;br&gt;
Output: [1,2,4]&lt;br&gt;
Explanation: The array represents the integer 123.&lt;br&gt;
Incrementing by one gives 123 + 1 = 124.&lt;br&gt;
Thus, the result should be [1,2,4].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 2:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Input: digits = [4,3,2,1]&lt;br&gt;
Output: [4,3,2,2]&lt;br&gt;
Explanation: The array represents the integer 4321.&lt;br&gt;
Incrementing by one gives 4321 + 1 = 4322.&lt;br&gt;
Thus, the result should be [4,3,2,2].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 3:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Input: digits = [9]&lt;br&gt;
Output: [1,0]&lt;br&gt;
Explanation: The array represents the integer 9.&lt;br&gt;
Incrementing by one gives 9 + 1 = 10.&lt;br&gt;
Thus, the result should be [1,0].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Constraints:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1 &amp;lt;= digits.length &amp;lt;= 100&lt;/li&gt;
&lt;li&gt;0 &amp;lt;= digits[i] &amp;lt;= 9&lt;/li&gt;
&lt;li&gt;digits does not contain any leading 0's.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Convert to string, then to number, then add one to the resulting converted number and then again do the inverse conversion.
Problem?
The test cases have few input numbers in the array which are of BigInteger data type (which means it is greater than Long), now BigInteger does not support .parseInt() method and hence, this approach will fail for these test cases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Important thing to note here is that the result array size is dynamic, which means that, if we have a last element in the array which is 9, then a carry has to be taken.&lt;br&gt;
Now, this carry will increase the array size and hence we have to think something around using a dynamic array and we all know that a dynamic array best friend is an ArrayList, so let's use it :')&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using ArrayList:
//Base case
If there are no elements in the passed array, then return a temporary array which has an element {1}.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;`class Solution {&lt;br&gt;
    public int[] plusOne(int[] digits) {&lt;br&gt;
        ArrayList result = new ArrayList();&lt;br&gt;
        if(digits == null || digits.length == 0){&lt;br&gt;
            int[] temp = {1};&lt;br&gt;
            return temp;&lt;br&gt;
        }&lt;/p&gt;

&lt;p&gt;// What the heck*1?&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    int carry = 0;
    for(int i= digits.length -1; i&amp;gt;=0; i--){
        if(i == digits.length-1){
            carry = carry + digits[i] + 1;
        }
        else
            carry = carry + digits[i];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;// What the heck*2?&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        result.add(0, carry%10);
        carry = carry /10;

    }
    if(carry == 1){
        result.add(0,1);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;//What the heck*3?&lt;br&gt;
        int[] resultArray = new int[result.size()];&lt;br&gt;
        for(int i=0; i&amp;lt;result.size(); i++){&lt;br&gt;
            resultArray[i] = result.get(i);&lt;br&gt;
        }&lt;br&gt;
        return resultArray;&lt;br&gt;
    }&lt;br&gt;
}`&lt;/p&gt;

&lt;h2&gt;
  
  
  Explaining the hecks*i:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Heck1:&lt;/strong&gt;&lt;br&gt;
We are traversing our array "digits" from the end, because remember that we have to add 1 at the LSB and also, what if, we have a number 9, at LSB? Then we have to make another variable called "carry" which will hold our carried integer.&lt;br&gt;
Now, what our first "if" is doing is, that it is taking up the last element of the array and it will run only one time,&lt;br&gt;
It is calculating the carry (if any) and adding it to itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Heck2:&lt;/strong&gt;&lt;br&gt;
Remember, the add operation of ArrayList DO NOT replace the value specified at a certain index, rather it just adds it there and shifts the old element to right.&lt;br&gt;
Thus, we will keep on adding carry, at the index position 0, that way, at the end, we will have our first element from digits array at the first index of result arrayList.&lt;br&gt;
Also, for reference;&lt;br&gt;
a%b == a modulus b == gives the REMAINDER&lt;br&gt;
Ex: 32%10 = 2&lt;br&gt;
Whereas, &lt;br&gt;
a/b == gives the QUOTIENT&lt;br&gt;
Ex: 32/10 = 3&lt;/p&gt;

&lt;p&gt;We very commonly use "/" operation to take out a certain value at the "1x"th position where x can be 0, 00, 000, 0000, anything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Heck3:&lt;/strong&gt;&lt;br&gt;
Because we want to return the result in the array format, hence we are creating a new array called resultArray[] which has the same length as of ArrayList result and then, we are just populating the values in this result[] array.&lt;/p&gt;

&lt;p&gt;That's pretty much all for this problem. :)&lt;/p&gt;

</description>
      <category>leetcode</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Day 3</title>
      <dc:creator>Nilesh</dc:creator>
      <pubDate>Wed, 16 Feb 2022 15:31:57 +0000</pubDate>
      <link>https://dev.to/nilesh_aggarwal/day-3-3b19</link>
      <guid>https://dev.to/nilesh_aggarwal/day-3-3b19</guid>
      <description>&lt;p&gt;Hello fellas, &lt;/p&gt;

&lt;p&gt;Today I was able to solve the following problems and study a bit more about Image Processing and Artificial Intelligence.&lt;/p&gt;

&lt;p&gt;Here's the summary and links which might be useful:&lt;/p&gt;

&lt;p&gt;Problem1:&lt;br&gt;
&lt;a href="https://dev.to/nilesh_aggarwal/leetcode-plus-one-solution-496m"&gt;https://dev.to/nilesh_aggarwal/leetcode-plus-one-solution-496m&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Problem2:&lt;/p&gt;

&lt;p&gt;Enjoy your day!!!&lt;/p&gt;

&lt;p&gt;Happy hacking ^_^&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Day 2</title>
      <dc:creator>Nilesh</dc:creator>
      <pubDate>Tue, 15 Feb 2022 08:22:07 +0000</pubDate>
      <link>https://dev.to/nilesh_aggarwal/day-2-4io8</link>
      <guid>https://dev.to/nilesh_aggarwal/day-2-4io8</guid>
      <description>&lt;p&gt;Let's have some &lt;strong&gt;Image Processing&lt;/strong&gt; today:&lt;/p&gt;

&lt;p&gt;So I have this course, COMP 6721 which covers the fundamental of Image Processing and today I learnt a few concepts of Image Transformation and Image Filtering.&lt;/p&gt;

&lt;h1&gt;
  
  
  Image Transformation Operations
&lt;/h1&gt;

&lt;p&gt;Image Transformation can be done in following two major ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Spatial Image Transformation&lt;/li&gt;
&lt;li&gt;Histogram Image Transformation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the previous lecture, I covered basic concepts of Image Transformations, like image rotation, scaling, translation, flip, affine transformation, wrap/swirl.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's a Spatial Image Transformation?
&lt;/h2&gt;

&lt;p&gt;A spatial transformation of an image is a geometric transformation of the &lt;strong&gt;image coordinate system&lt;/strong&gt;.&lt;br&gt;
There are certain ways we can perform Spatial Image Transformation, to list some of these:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Linear Point Transformation &lt;/li&gt;
&lt;li&gt;Log Transformation&lt;/li&gt;
&lt;li&gt;Gamma Transformation &lt;/li&gt;
&lt;li&gt;Piece-Wise Linear Transformation &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Log transformations are mainly used in the MRI and Gamma transformation uses a Gamma function to convert the image to dark or light depending on the Input Intensity Levels.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Histogram Transformation?
&lt;/h2&gt;

&lt;p&gt;A histogram transformation is a pixel-by-pixel intensity transformation defined by five parameters in PixInsight: Clipping points.&lt;br&gt;
Now we can define the transformation using the Bars also.&lt;br&gt;
Ex: Consider an image of 64x64 pixel values, then each pixel will have different pixel value from &lt;a href="https://dev.toif%20it%20is%20an%208%20bit%20image%20--%202**8%20=%20256"&gt;0...255&lt;/a&gt;.&lt;br&gt;
Here, value of pixel 0 means --&amp;gt; darkest&lt;br&gt;
and value of pixel 255 means --&amp;gt; brightest&lt;/p&gt;

&lt;p&gt;Now, let's say we have 2 pixels who has value of 0, then we will make a bar in the graph, where:&lt;br&gt;
x-axis = pixel value (Ex: x-axis --&amp;gt; 0)&lt;br&gt;
y-axis = frequency of that pixel (Ex: y-axis --&amp;gt; 2)&lt;/p&gt;

&lt;p&gt;And hence, simply plot the graph now.&lt;/p&gt;

&lt;p&gt;We call, each of these bars created as BINS. These bins not necessarily have to store only the fixed value, rather it can store the range of the pixel values.&lt;br&gt;
Example: pixel values in the range 0-15 can be in Bin b1, and pixel values in the range of 245-255 can be in bin b16 and so and so forth.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Contrast?
&lt;/h2&gt;

&lt;p&gt;Contrast is the difference in luminance or color that makes an object distinguishable from other objects in the same field of view.&lt;br&gt;
A low contrast image has the objects which are hard to identify in the image and hence we sometimes do an auto-contrast function to fix the image contrast and make the objects in the image clearly distinct-able.&lt;/p&gt;

&lt;p&gt;Now Contrast Enhancement can be done by two ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Linear method

&lt;ul&gt;
&lt;li&gt;Contrast Stretching&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Non-Linear method

&lt;ul&gt;
&lt;li&gt;Histogram Equalization&lt;/li&gt;
&lt;li&gt;To enhance the image's contrast, it spreads out the most frequent pixel intensity values or stretches out the intensity range of the image.&lt;/li&gt;
&lt;li&gt;Gaussian Stretch &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Image Filtering
&lt;/h1&gt;

&lt;p&gt;When we talk about Image Filtering then we are talking about images in the spatial domain, and hence we will deal with pixels here.&lt;/p&gt;

&lt;p&gt;So to filter an image, we filter every pixel of the input image and to do so, we use filters which are known as Kernel Filters or we also call them as Spatial Filters.&lt;br&gt;
This filter has to be unique across rows and columns and it looks like following:&lt;/p&gt;

&lt;p&gt;(It is usually an odd dimension m x n, where m=n=2n+1)&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;Input image --&amp;gt; 8x8 image&lt;br&gt;
[0, 65,231, 87, 2, 7, 255...m8]&lt;br&gt;
[nk ... mk]&lt;br&gt;
[n8 ... m8]&lt;br&gt;
Kernel --&amp;gt; 3x3 matrix&lt;br&gt;
[1,0,1]&lt;br&gt;
[2,0,2]&lt;br&gt;
[1,0,1]&lt;/p&gt;

&lt;p&gt;And to calculate the output image, just multiply the Kernel with the input image pixels over that dimension with a stride of 1.&lt;br&gt;
What's stride?&lt;br&gt;
Stride is basically how many pixel values you will be jumping/traversing in each calculation.&lt;/p&gt;

&lt;p&gt;So basically, we have image kernels, which determine the output of the image and depending on the kernel we are using, we will get a certain output.&lt;/p&gt;

&lt;p&gt;And there are certain set of kernel values already defined using which we can generate the "Convolved Image".&lt;/p&gt;

&lt;p&gt;Major operations in Image Filtering are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Image Smoothing using Low-Pass Filters

&lt;ul&gt;
&lt;li&gt;Box Filter&lt;/li&gt;
&lt;li&gt;Gaussian Filter&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Image Sharpening using High-Pass Filters

&lt;ul&gt;
&lt;li&gt;Laplacian Filter&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;... to be continued to day 3&lt;/p&gt;

&lt;p&gt;What's next?&lt;br&gt;
I will be completing this lecture along with the code examples.&lt;br&gt;
And we will solve few coding problems as well (Arrays, Strings, HashMaps)&lt;/p&gt;

&lt;p&gt;Thank you!&lt;/p&gt;

&lt;p&gt;Happy hacking ^_^&lt;/p&gt;

</description>
      <category>100daysofdevelopment</category>
      <category>100daysofcode</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Day 1</title>
      <dc:creator>Nilesh</dc:creator>
      <pubDate>Mon, 14 Feb 2022 04:19:37 +0000</pubDate>
      <link>https://dev.to/nilesh_aggarwal/day-1-32hh</link>
      <guid>https://dev.to/nilesh_aggarwal/day-1-32hh</guid>
      <description>&lt;h1&gt;
  
  
  Problem 1:
&lt;/h1&gt;

&lt;p&gt;(Intersection of Two Arrays)&lt;br&gt;
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.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 1:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Input: nums1 = [1,2,2,1], nums2 = [2,2]&lt;br&gt;
Output: [2,2]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 2:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4]&lt;br&gt;
Output: [4,9]&lt;br&gt;
Explanation: [9,4] is also accepted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Approach:&lt;/strong&gt;&lt;br&gt;
Brute Force --&amp;gt; Use two for loops to iterate over both the loops and find out the common element and store them in a different array.&lt;br&gt;
Time - O(n*n) | Space - O(n)&lt;/p&gt;

&lt;p&gt;Note: If you are using an array list, then make sure, that you have a method in your solution called "listToArray()"&lt;/p&gt;

&lt;p&gt;&lt;code&gt;private int[] listToArray(List&amp;lt;Integer&amp;gt; list){&lt;br&gt;
        int[] result = new int[list.size()];&lt;br&gt;
        for(int i =0; i&amp;lt; list.size(); i++){&lt;br&gt;
            result[i] = list.get(i);&lt;br&gt;
        }&lt;br&gt;
        return result;    &lt;br&gt;
    }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Two Pointer --&amp;gt; Sort the two arrays and iterate over to find out the intersections. Use an array list because we want to space some space and hence we will dynamically update the array list every time we find an intersection.&lt;/p&gt;

&lt;p&gt;Ref: &lt;a href="https://medium.com/@punitkmr/intersection-of-two-arrays-ii-ffb26f04dfd1" rel="noopener noreferrer"&gt;https://medium.com/@punitkmr/intersection-of-two-arrays-ii-ffb26f04dfd1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using HashMap: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Populate the hashmap with first array with the keys as the numbers and it's frequency as the count&lt;/li&gt;
&lt;li&gt;Create an array list &lt;/li&gt;
&lt;li&gt;Iterate over the second array and find the common elements&lt;/li&gt;
&lt;li&gt;Imp: Make sure you are reducing the count from the map, so that ONLY the INTERSECTION is getting returned.&lt;/li&gt;
&lt;li&gt;Return the matched values in the array list&lt;/li&gt;
&lt;li&gt;Convert this array list to array using custom listToArray() method, in which you are just feeding every element from the array list to this array and return it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Code (HashMap):&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;`class Solution {&lt;br&gt;
    public int[] intersect(int[] nums1, int[] nums2) {&lt;br&gt;
        if(nums1 == null || nums2 == null || nums1.length == 0 || nums2.length == 0){&lt;br&gt;
            return new int[0];&lt;br&gt;
        }&lt;br&gt;
        HashMap map = new HashMap&amp;lt;&amp;gt;();&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    //populating the hash map with the array 1 values
    for(int num: nums1){
        if(map.containsKey(num)){
            map.put(num, map.get(num)+1); // if value is repeated, then save the value, but increment the key count, that's why "get()+1".
        }
        else
            map.put(num, 1);
    }
    //create an arrayList to store the result

    List&amp;lt;Integer&amp;gt; result = new ArrayList&amp;lt;&amp;gt;();

    //iterate and match with nums2 now;
    for(int num: nums2){
        if(map.containsKey(num) &amp;amp;&amp;amp; map.get(num) &amp;gt; 0){
            result.add(num); //adding the matched value in the array list -- intersection operation
            int count = map.get(num);
            count--;
            map.put(num, count);
        }
    }
    return listToArray(result);
}
private int[] listToArray(List&amp;lt;Integer&amp;gt; list){
    int[] result = new int[list.size()];
    for(int i =0; i&amp;lt; list.size(); i++){
        result[i] = list.get(i);
    }
    return result;    
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}`&lt;/p&gt;

</description>
      <category>coding</category>
      <category>leetcode</category>
      <category>java</category>
      <category>100daysofcode</category>
    </item>
    <item>
      <title>Intro</title>
      <dc:creator>Nilesh</dc:creator>
      <pubDate>Sun, 13 Feb 2022 07:07:45 +0000</pubDate>
      <link>https://dev.to/nilesh_aggarwal/intro-3lej</link>
      <guid>https://dev.to/nilesh_aggarwal/intro-3lej</guid>
      <description>&lt;p&gt;Hey folks, &lt;/p&gt;

&lt;p&gt;This being my first ever blog, I will briefly tell about who I am, what I am doing and what I am planning to do. &lt;br&gt;
I won't be writing about coding each day, but some development that I did today and also some outdoor fun, as I love going out and exploring new places!!&lt;br&gt;
So here it goes...  ^_^&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;About me:&lt;/strong&gt;&lt;br&gt;
Final Year Masters student in Computer Science at Concordia University, Montreal, Quebec, Canada.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I am doing:&lt;/strong&gt;&lt;br&gt;
Coding | Development | Artificial Intelligence | Deployment.&lt;br&gt;
Basically everything from development till deployment :)&lt;br&gt;
My tech stack includes &lt;code&gt;Java, React, AWS, Docker, Python for AI&lt;/code&gt;&lt;br&gt;
Currently learning about Terraform, Kubernetes, SalesForce, ServiceNow&lt;/p&gt;

&lt;p&gt;PS: If you are preparing for a certain certification and looking for a prep buddy, loop me in, as I am also planning to do some in coming few months.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Planning to do:&lt;/strong&gt;&lt;br&gt;
Equipping myself each day with some technical, business, investment knowledge. &lt;br&gt;
I want to learn and grow each day.&lt;/p&gt;

&lt;p&gt;Happy Hacking ^_^&lt;/p&gt;

</description>
      <category>coding</category>
      <category>java</category>
      <category>100daysofcode</category>
    </item>
  </channel>
</rss>
