<?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: Mukilan Palanichamy</title>
    <description>The latest articles on DEV Community by Mukilan Palanichamy (@mukilan_palanichamy_ecaa5).</description>
    <link>https://dev.to/mukilan_palanichamy_ecaa5</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%2F2572429%2F79c5ca8b-e09d-429a-996d-38c554e41746.jpg</url>
      <title>DEV Community: Mukilan Palanichamy</title>
      <link>https://dev.to/mukilan_palanichamy_ecaa5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mukilan_palanichamy_ecaa5"/>
    <language>en</language>
    <item>
      <title>My journey in Competitive Programming</title>
      <dc:creator>Mukilan Palanichamy</dc:creator>
      <pubDate>Mon, 16 Dec 2024 14:50:07 +0000</pubDate>
      <link>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-1lp9</link>
      <guid>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-1lp9</guid>
      <description>&lt;p&gt;I practiced today with three very important linked list problems: reversing a linked list, finding the middle node, and deleting a node. I feel that it was quite a hard journey yet so rewarding.&lt;/p&gt;

&lt;p&gt;The first problem is &lt;strong&gt;reversing a linked list&lt;/strong&gt;. Reverse the nodes in the linked list. That means last becomes a head, and a head will be at the last place. So, I implemented the above two approaches. In the iterative method, I used three pointers to change the links one after the other. This simply reverses the list. The recursive method was neater, but took a little bit of extra time to think about since it involved reversing the rest of the list and then moving the pointers about.&lt;/p&gt;

&lt;p&gt;I then progressed to another: &lt;strong&gt;find the middle node&lt;/strong&gt; of a given linked list. The list contained a middle node and therefore, based on this observation, determined its position. In the approach, I used two pointers. The fast pointer basically moved two steps, and the slow pointer only one. By the time the fast pointer reached the end, it pointed to the middle node. It's a very interesting approach, and I like how much more efficient it is as opposed to counting the nodes first and then traversing to the middle.&lt;/p&gt;

&lt;p&gt;Finally, I did an exercise of &lt;strong&gt;deleting a node from a linked list&lt;/strong&gt;. The task was about removal of a node either by its value or position. So, I learned how to traverse the list carefully find the node to delete and change the preceding node's pointer to skip the node that is being removed. I handled edge cases, like head deletion or node doesn't exist.&lt;/p&gt;

&lt;p&gt;By the end of the day, I was so satisfied at the fact that I had made steady progress in understanding what a linked list is. These problems were excellent for building my confidence at being able to solve even more significant linked list problems in the future.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My journey in Competitive Programming</title>
      <dc:creator>Mukilan Palanichamy</dc:creator>
      <pubDate>Mon, 16 Dec 2024 14:43:14 +0000</pubDate>
      <link>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-490l</link>
      <guid>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-490l</guid>
      <description>&lt;p&gt;The content indicates a journey through competitive programming, from simple concepts to complex ones. Challenges and growth in understanding linked lists and stacks while solving problems have been highlighted. Some of the key points to be broken down are as follows:&lt;/p&gt;

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

&lt;p&gt;Subsets of a given array were to be generated using backtracking. It used a stack as the data structure that tracked the current subset under formation.&lt;br&gt;
The approach was based on recursion, where items were pushed and popped from the stack as subsets were produced.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Calculator II:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was a simple calculator that added/subtracted, multiplied/divided. A stack was required to keep track of intermediate results, especially for expressions with operators that have precedence such as multiplication/division before addition/subtraction. The use of a stack helped in keeping track of the order of evaluation and efficiently arrived at the final result.  &lt;/p&gt;

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

&lt;p&gt;Stacks were a rather important data structure.&lt;br&gt;
Learning was focused around ways stacks could be used when sequential dependencies appeared: namely, to evaluate expressions, follow states of recursion, etc.   &lt;/p&gt;

&lt;p&gt;I hope my experience will be helpful.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My journey in Competitive Programming</title>
      <dc:creator>Mukilan Palanichamy</dc:creator>
      <pubDate>Mon, 16 Dec 2024 14:31:23 +0000</pubDate>
      <link>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-j07</link>
      <guid>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-j07</guid>
      <description>&lt;p&gt;Hello, Everyone! Today, I have solved three problems on LeetCode: Letter Combination of a Phone Number, Container with Most Water and Rotate Array. It seems that solving a different type of problem each day opens our eyes to view each problem from various aspects of thinking. One problem can have numerous solutions. Once we get one solution, there is no point to stop until we try to optimize its solution as well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Letter Combination of a Phone Number&lt;/strong&gt;: We may solve this problem by using backtracking with just one base condition. It needs finding all the possible character combinations that correspond to specific digits within the input provided. A base condition helps in making termination when needed in the execution of the function. This makes the solution effective.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Container holding Maximum Water&lt;/strong&gt;: Here we find the maximum area possible. We are traversing the array using two pointers one starting from the beginning and the other from the last of the array. It is going to give the solution with a very efficient approach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rotate Array&lt;/strong&gt;: This is one problem in the number of positions where you should rotate the array. The problem is possible with a slicing an array at specified position and you should make the new array attaching slices in the proper order. This type of approach towards the problem solution will be helpful to get the problem's solution.&lt;/p&gt;

&lt;p&gt;I hope my experience will be helpful to you.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My journey in competitive programming</title>
      <dc:creator>Mukilan Palanichamy</dc:creator>
      <pubDate>Mon, 16 Dec 2024 14:26:54 +0000</pubDate>
      <link>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-4d0i</link>
      <guid>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-4d0i</guid>
      <description>&lt;p&gt;Hi, Folks! Today I solved three problems on LeetCode : Unique Paths, Spiral matrix, and N-Queens. Let’s walk through these problems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Unique paths problem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We are given two numbers, representing number of rows and number of columns. Our task is to find the total number of unique paths to reach the position (m-1,n-1) from (0,0). To solve this problem, we can follow recursive approach. We can start from (0,0) recursively find steps to travel right and bottom until we reach the required position. To find total unique paths, we would add the right steps to bottom steps and return it. However, there is a small issue with this approach: the solutions may repeat number of times. To overcome this, the alternative approach is to use DP matrix. We create a DP matrix with same number of rows and columns as input and we initialize all positions of DP matrix with 1. Finally, we return the value in the lats cell of DP matrix as total number off unique paths.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Spiral Matrix&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We are given with a matrix and we have to return a list containing the elements of matrix in spiral order. To solve this problem, we can use indexing limits as conditions to run a loop. We traverse from left to right of matrix we can use one for loop. Then, we move from the top-right corner to the bottom-right corner with another loop. We traverse from the bottom-right corner to the bottom-left corner using a third loop. Finally, we move from the bottom-left corner to the top-left corner with a fourth loop. In this way, we use four different loops to traverse in all four directions, controlling them with indexing limits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;N-Queens&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We are given with a input number n, we have to find the number of ways to place n queens in nxn matrix such that no two queens will attack each other. This means no two queens should be in same row, column, or diagonal. To solve this problem, we can use recursion and backtracking concepts. We can first perform recursion to repeat the process multiple times. because, we need to find all the possible ways to place queens. Backtracking is performed when we did not find the correct position to place queen then we can replace ‘Q’ with ‘.’ and repeat the process for the next position.&lt;/p&gt;

&lt;p&gt;We can optimize the above solution by using three lists. One lists is to keep track of number of rows. lets say we have n rows we will place n zeros in the list and replace the respective zero by one if that specific row is having queen. This will avoid unnecessary backtracking. Similarly, the second list is for lower diagonal, and third list is for upper diagonal. Both diagonal lists have 2n-1 elements all initially set to zeros. As we traverse through the matrix to place queens, we update the respective row or diagonal list by replacing 0 with 1 when queen is placed. This indicates that no more queens can be placed in that respective diagonal or row. In this way, this approach works efficiently.&lt;/p&gt;

&lt;p&gt;I hope my experience will be helpful.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My journey in competitive programming</title>
      <dc:creator>Mukilan Palanichamy</dc:creator>
      <pubDate>Mon, 16 Dec 2024 14:21:03 +0000</pubDate>
      <link>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-3chj</link>
      <guid>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-3chj</guid>
      <description>&lt;p&gt;Hi, Folks! Today, I solved three problems on LeetCode: Max Chunks to Make Sorted, Find the Town Judge, and Maximum Subarray. Every competitive programmer has their own logic to solve problems. However, algorithms can sometimes optimize the solution. For a programmer, solving the problem is not the challenge; solving the problem in an optimized way is the real challenge. This can sometimes be achieved through algorithms and sometimes with our own logic. As programmers, we should know both algorithmic and logical approaches.&lt;/p&gt;

&lt;p&gt;Max Chunks to Make Sorted: To solve this problem, we can traverse through the input array and, for each traversal, find the maximum number in the array. Every time you find a new maximum number, keep track of the count. This count will be the result. This approach will solve the problem effectively.&lt;/p&gt;

&lt;p&gt;Find the Town Judge: To solve this problem, we first need to fully understand the problem statement. We need to identify the town judge, who trusts no one but is trusted by everyone else. Once we grasp the problem statement, solving it becomes straightforward.&lt;/p&gt;

&lt;p&gt;Maximum Subarray: To solve this problem, we can use Kadane’s Algorithm, which is one of the most efficient ways to solve it. Using this algorithm makes the problem much easier compared to my initial logic.&lt;/p&gt;

&lt;p&gt;I hope my experience will be helpful.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My journey in Competitive programming</title>
      <dc:creator>Mukilan Palanichamy</dc:creator>
      <pubDate>Mon, 16 Dec 2024 14:18:10 +0000</pubDate>
      <link>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-14jm</link>
      <guid>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-14jm</guid>
      <description>&lt;p&gt;Hi, Folks! Today I want to share my experience in LeetCode problem-solving. I am a beginner in data structures and algorithms, and currently, I am focusing on Python. I solved tow questions from the linked list concept on LeetCode: Merge k Sorted Lists, Reverse Linked List.&lt;/p&gt;

&lt;p&gt;For the problem Merge k Sorted Lists, there are many approaches you can choose. But, choosing the most efficient one comes with practice. As a beginner, I started with this approach: I created a new list, merged all the given lists into the newly created list, and then sorted it.&lt;/p&gt;

&lt;p&gt;After completing the coding part, I wanted to know if there were any other approaches. So, I went through some resources and discovered that there is an even more efficient way using a min-heap. I found this approach to be more logical compared to mine, and this realization comes only with practice. If we can think of the most efficient logic in our first approach, it indicates that we are experts in programming.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My journey in Competitive programming</title>
      <dc:creator>Mukilan Palanichamy</dc:creator>
      <pubDate>Mon, 16 Dec 2024 10:13:37 +0000</pubDate>
      <link>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-5cbf</link>
      <guid>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-5cbf</guid>
      <description>&lt;p&gt;Hello, Friends! Today, I solved three problems on LeetCode: Permutation Sequence, Maximum Number of K-Sum Pairs, and Longest Palindromic Substring. We can solve both Maximum Number of K-Sum Pairs and Longest Palindromic Substring by using the two-pointer technique, while for Permutation Sequence, a logical approach can be used.&lt;/p&gt;

&lt;p&gt;The two-pointer technique can also be connected to our day-to-day life. Consider an instance where we want to search for a book on the shelf. If only one person is searching, it will take a longer time compared to two people searching together. Similarly, the two-pointer technique involves traversal of an array from both ends: the first pointer starts at index zero, moving from left to right, while the second pointer starts at the last index, moving from right to left. This simultaneous traversal helps us reach the target in a shorter time.&lt;/p&gt;

&lt;p&gt;To solve Permutation Sequence, we use a very logical approach. The understanding behind this problem often needs one or two dry runs of the code. It is often really hard to explain the solution in words so it might be helpful to use further resources if you have not been able to solve this on your own. But understanding the concept and the logic behind the code solves this problem.&lt;/p&gt;

&lt;p&gt;Hope so, my experience will come in handy!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My journey in competitive programming</title>
      <dc:creator>Mukilan Palanichamy</dc:creator>
      <pubDate>Mon, 16 Dec 2024 10:11:11 +0000</pubDate>
      <link>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-18d8</link>
      <guid>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-18d8</guid>
      <description>&lt;p&gt;Hello, friends! Today, I have solved four problems on LeetCode, which are Generate Parentheses, 3Sum Closest, Remove K-Digits, and Number of Subarrays with Bounded Maximum. All of these can be solved using different concepts. So by solving at least one problem from each concept, we can recap various concepts in a single day.&lt;/p&gt;

&lt;p&gt;The Generate Parentheses problem is solved with a recursive approach. 3Sum Closest is solvable with the two-pointer approach. Remove K-Digits, as a logical problem can be approached by using a stack. Finally, the Number of Subarrays with Bounded Maximum problem can also be solved with a logical approach.&lt;/p&gt;

&lt;p&gt;This involves finding all the possible parenthesized arrangements of a given number within the Generate Parentheses problem. Applying recursion here, we go over the process until we hit all possible arrangements. If we hit the input number, we stop.&lt;/p&gt;

&lt;p&gt;In the 3Sum Closest problem, we use the two-pointer technique. We initialize the left pointer to zero and the right pointer to the last index. We then traverse with both pointers until we find the sum closest to the target.&lt;/p&gt;

&lt;p&gt;We can solve Remove K-Digits using a stack with a logical approach. In this problem, we also have to handle edge cases like leading zeros. In each iteration, we push the smaller digits to the stack and then pop the stack at the end to form the new number.&lt;/p&gt;

&lt;p&gt;For the Count of Subarrays with Bounded Maximum, we use a loop from the array to traverse each, compare it with the defined bounds, and then move on to increment the counter. At the end of it all, we are returning the count.&lt;/p&gt;

&lt;p&gt;Well, hope my experience helps!!!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My journey in competitive programming</title>
      <dc:creator>Mukilan Palanichamy</dc:creator>
      <pubDate>Mon, 16 Dec 2024 10:04:17 +0000</pubDate>
      <link>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-38of</link>
      <guid>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-38of</guid>
      <description>&lt;p&gt;Hi, folks! Today, I solved four problems on LeetCode: Generate Parentheses, 3Sum Closest, Remove K-Digits, and Number of Subarrays with Bounded Maximum. Each problem can be solved using different concepts. By solving at least one problem from each concept, we can recap various concepts in a single day.&lt;/p&gt;

&lt;p&gt;The Generate Parentheses problem can be solved using recursion. 3Sum Closest can be solved with the two-pointer technique. Remove K-Digits is a logical problem that can be approached using a stack. Finally, Number of Subarrays with Bounded Maximum can also be solved with a logical approach.&lt;/p&gt;

&lt;p&gt;In the Generate Parentheses problem, we need to find all possible arrangements of parentheses for a given number. With the help of recursion, we repeat the process until we find all possible arrangements. The base condition is reaching the input number.&lt;/p&gt;

&lt;p&gt;In the 3Sum Closest problem, we use the two-pointer technique. We start with the left pointer at zero and the right pointer at the last index. We traverse with both pointers until we find the sum closest to the target.&lt;/p&gt;

&lt;p&gt;To solve Remove K-Digits, we need to use a stack along with a logical approach. In this problem, we also have to handle edge cases like leading zeros. The stack is used to store smaller digits in each iteration, and at the end, we pop the stack to create the new number.&lt;/p&gt;

&lt;p&gt;For the Number of Subarrays with Bounded Maximum, we can use a loop to traverse the array, compare each element with the given bounds, and increment the count accordingly. In the end, we return the count.&lt;/p&gt;

&lt;p&gt;I hope my experience will be helpful!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My journey in Competitive Programming</title>
      <dc:creator>Mukilan Palanichamy</dc:creator>
      <pubDate>Mon, 16 Dec 2024 09:59:08 +0000</pubDate>
      <link>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-4nhk</link>
      <guid>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-4nhk</guid>
      <description>&lt;p&gt;Hi, Folks! Today, I solved three problems on LeetCode: Combination Sum, Combination Sum II, and Partition Equal Subset Sum. For the first two problems, we use backtracking to find all the possible solutions. When the task is to explore all possible solutions, backtracking is often the preferred approach. Typically, in problems, we stop once we find a solution, but in backtracking, we must undo our choices and explore other possible solutions. The process of undoing choices and continuing the search is what we refer to as backtracking.&lt;/p&gt;

&lt;p&gt;Backtracking is an important concept that can solve many difficult problems efficiently, such as N-Queens, Word Search, and Combination Sum, among others.&lt;/p&gt;

&lt;p&gt;To solve the Partition Equal Subset Sum problem, we use dynamic programming rather than a hash map. We track whether it’s possible to form a subset with a given sum. It’s somewhat similar to a real-life scenario where you go grocery shopping and use a checklist to ensure you buy every required item. You mark off each item after purchase. Similarly, in dynamic programming, we mark the achievable subset sums as we process each element in the array.&lt;/p&gt;

&lt;p&gt;I hope my experience will be helpful!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My journey in Competitive Programming</title>
      <dc:creator>Mukilan Palanichamy</dc:creator>
      <pubDate>Mon, 16 Dec 2024 09:53:13 +0000</pubDate>
      <link>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-3ocj</link>
      <guid>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-3ocj</guid>
      <description>&lt;p&gt;Hi, people! Today, I have solved three problems on LeetCode: Maximum Value at a Given Index in a Bounded Array, Maximum Length of Pair Chain, and Push Dominoes. This week, aside from revision, I have added some new problems to my plan. I plan out the whole week on Monday really helps a lot. No need to think every day about what to practice! We will get clarity on our plan and can schedule all other daily tasks accordingly.&lt;/p&gt;

&lt;p&gt;To solve Maximum Value at a Given Index in a Bounded Array, we need to build an array for which the sum of elements in the array is less than or equal to the target sum given as an input and the length of the created array should be equal to the target length. We can efficiently manage the left and the right sides by using the technique of two pointers and managing the sum for both sides, and this is how this problem is solved.&lt;/p&gt;

&lt;p&gt;In Maximum Length of Pair Chain, we need to check if every chain satisfies the given constraints. If a chain does satisfy the given constraints, we count that chain; otherwise, we skip it. We can sort all chains and then by iterating over them, checking the constraints, and counting them, return the result, thereby solving the problem properly.  &lt;/p&gt;

&lt;p&gt;I hope my experience will be helpful!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My journey in Competitive Programming</title>
      <dc:creator>Mukilan Palanichamy</dc:creator>
      <pubDate>Mon, 16 Dec 2024 09:36:57 +0000</pubDate>
      <link>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-4a4p</link>
      <guid>https://dev.to/mukilan_palanichamy_ecaa5/my-journey-in-competitive-programming-4a4p</guid>
      <description>&lt;p&gt;Hi folks! Today, I solved three problems on LeetCode: Jump Game, Triangle, and Min Stack. In both the Jump Game and Triangle problems, we have to find an efficient logic to solve them. In the Min Stack problem, we need to use the stack data structure. Always make sure to review the problems you’ve completed at least once a week. This will help you connect previously learned concepts with newly learned ones.&lt;/p&gt;

&lt;p&gt;To solve the Jump Game problem, we traverse through the input array, keeping track of the farthest index we can reach. If we can reach or exceed the last index of the input array, we return true. Otherwise, we return false.&lt;/p&gt;

&lt;p&gt;To solve the Triangle problem, we can use nested for loops to traverse the triangle and find the minimum element at each level. We add these minimum elements to get the sum. This is how we can solve this problem.&lt;/p&gt;

&lt;p&gt;To solve the Min Stack problem, we can implement a stack and create methods like push, pop, top, and get Min. This approach helps us solve the problem efficiently.&lt;/p&gt;

&lt;p&gt;I hope my experience will be helpful to you!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
