<?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: Somuya Khandelwal</title>
    <description>The latest articles on DEV Community by Somuya Khandelwal (@somuya_khandelwal).</description>
    <link>https://dev.to/somuya_khandelwal</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%2F2584579%2F5d901883-9800-4452-bf34-e597c6dee6a7.png</url>
      <title>DEV Community: Somuya Khandelwal</title>
      <link>https://dev.to/somuya_khandelwal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/somuya_khandelwal"/>
    <language>en</language>
    <item>
      <title>DAY 65 The Final Chapter: Mastering Binary Search Trees</title>
      <dc:creator>Somuya Khandelwal</dc:creator>
      <pubDate>Wed, 18 Dec 2024 11:26:09 +0000</pubDate>
      <link>https://dev.to/somuya_khandelwal/day-65-the-final-chapter-mastering-binary-search-trees-2n7b</link>
      <guid>https://dev.to/somuya_khandelwal/day-65-the-final-chapter-mastering-binary-search-trees-2n7b</guid>
      <description>&lt;p&gt;Hello Everyone!  &lt;/p&gt;

&lt;p&gt;This is my final post as part of the &lt;strong&gt;LeetCode Weekly Challenge&lt;/strong&gt;, after doing it for &lt;strong&gt;13 weeks&lt;/strong&gt;. It’s only fair that the last day was dedicated to &lt;strong&gt;Binary Search Trees&lt;/strong&gt;, as structured thinking and precision is something I was developing throughout these weeks. Dealing with these challenges seemed like a string of puzzles explored in an enviable system—I have definitely progressed a lot.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Events for the Day&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;h5&gt;
  
  
  Search in a Binary Search Tree (Easy Difficulty)
&lt;/h5&gt;

&lt;p&gt;– This operation takes a node in a BST and returns the subtree of a node.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Traversed the tree using the properties of BSTs: changing right or left as the case may be in relation to comparisons.
– Returned the node when the value matched or None if it was not found.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
I found it rather enjoyable to watch the search progressing dynamically, as if the tree pointed at me and lead to the target.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Remove a Node in a BST (Between Medium and Hard Difficulty)&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Given the value of a node, alter a BST to attempt to eliminate a node with that particular value but retain all BST properties.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Used recursion to locate the node and handled three cases:
In the case of trees, a simple deletion of leaf nodes was carried out.
Redundant nodes with only one progeny were substituted by this progeny.
Ã¢â‚¬â€¡ The nodes that have two children were replaced with the next node in order which preserved the BST property.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
Swinging the airship and maintaining the stability of the tree in order did remind me of working on a wonderful painting, one brush stroke at a time.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Features That Made Today Unique&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A Grand Finale:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Picking BSTs as the last concept on this journey was ideal since they require accuracy and efficiency, and that is what this data structure is all about.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reflecting on Growth:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
I really could not help but feel that today’s problems – including simple array manipulations to very intricate tree walks – had it all: 13 weeks of training right there.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Satisfaction of Mastery:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Getting right these challenges impacted a positive aspect of the result on me and proved that I have been improving.  &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;BSTs Are About Balance:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Other problems such as &lt;strong&gt;Delete Node in a BST&lt;/strong&gt; capture the essence of structure use in dealing with complex problems.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Precision is Power:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In both the tasks of search and modification, the need to be precise was underscored profoundly to work in a hierarchy that is well thought out.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learning Never Stops:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Although this challenge is over here, the things I discussed in this lecture are going to be my best compass for my coding path.  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Reflections&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Search in a Binary Search Tree&lt;/strong&gt; problem was a pleasant problem that showed how convenient traversal in BST is, and the &lt;strong&gt;Delete Node in a BST&lt;/strong&gt; problem overlaid it with more depth through restructuring. Both of these tasks was apparently a worthy end to a series that has posed as much a challenge as it has been enjoyable.  &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;A Journey Completed&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Exactly 13 weeks ago, I embarked on this quest to comprehensively address LeetCode problems with the end goal of evolving as a problem-solver. Over time, I have dwelled in various issues such as arrays, strings, dynamic programming, graph, trees and others. Every week introduced new issues, new experience, and increased understanding of coding as an art.  &lt;/p&gt;

&lt;p&gt;To be clear, this series has been more than simple solving of issues; it has been a process of learning, strength building and exploration. I find myself solving problems with confidence, appreciate that there is no problem too small to solve, and that problems are multi-faceted.  &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What’s Next?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Although this 13 week journey is completed today, my journey of coding continues. I look forward to the next steps facing new challenges of problem solving, discovering new algorithms, and telling stories. If there exists one thing that I’ve come to realisation then that is; every answere solved is a way towards mastery and every lesson /difficulty faced is a way towards learning.  &lt;/p&gt;

&lt;p&gt;To all those readers who have been following this page- thank you for the company. So let’s continue coding, learning, and creating, there’s so much more ahead of in the horizon for us all!  &lt;/p&gt;

</description>
    </item>
    <item>
      <title>DAY 64 Binary Tree BFS: Traversing and Optimizing Levels</title>
      <dc:creator>Somuya Khandelwal</dc:creator>
      <pubDate>Wed, 18 Dec 2024 11:14:56 +0000</pubDate>
      <link>https://dev.to/somuya_khandelwal/day-64-binary-tree-bfs-traversing-and-optimizing-levels-g0p</link>
      <guid>https://dev.to/somuya_khandelwal/day-64-binary-tree-bfs-traversing-and-optimizing-levels-g0p</guid>
      <description>&lt;p&gt;Hello Everyone!  &lt;/p&gt;

&lt;p&gt;On Day 4 of Week 13, the concept of &lt;strong&gt;Binary Tree BFS Problems&lt;/strong&gt; was introduced and breadth-first traversal was emphasized. Today’s challenges demanded the tree level by level approach, making views and sums dependent on each other. This is very similar to that gesture that one makes when they zoom out the background while painting a picture behind the tree.&lt;/p&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;The Coupling of Events&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;BT Right Side View (Medium Level)&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is the algorithm for a binary tree that would return rightmost node of each level as we look at it from the right??
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;
I used the BFS technique to traverse the tree in a level by level manner.
For all the levels, we appended the last node in the queue to the result list.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
It was like capturing a kind of picture from a certain angle while watching the tree turning into a right-side view.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Maximum Level Sum of a Binary Tree (1) – Medium&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Determine the depth of the binary tree over which the sum of the nodes is the highest.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;
Traveled tree using BFS as the algorithm went level by level, summing up node values of each level.

&lt;ul&gt;
&lt;li&gt;Kept track of the level with the max sum as the traversal went from one level to the next.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
Watching the amounts grow, and finding the maximum increase level was like finding the energy maxima in a tree.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;Signs That Made Today Special&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Level-by-Level Exploration:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Both problems demonstrated how BFS is effective in capturing the tree in level-wise partitions for analysis.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dynamic Optimizations:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In the &lt;strong&gt;Maximum Level Sum of a Binary Tree&lt;/strong&gt; solution, another technique in calculating was exemplified by dynamic tracking during traversal.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Practical Visualization:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Such technicalities as &lt;strong&gt;Binary Tree Right Side View&lt;/strong&gt; brought depth into the problem view by making one consider a tree from different angles.  &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;BFS Simplifies Level-Wise Analysis:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Examples include; &lt;strong&gt;Binary Tree Right Side View&lt;/strong&gt; where BFS’s capability of obtaining level-specific information is evident in trees.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dynamic Value Tracking is Crucial:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The problem &lt;strong&gt;Maximum Level Sum of a Binary Tree&lt;/strong&gt; also showed the need for real-time computation during traversal for getting the best solution.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Perspective Adds Value:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Both tasks showed that selective attention to certain aspects (right side or level sums), provides different angle of the tree perception.  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Reflections&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Binary Tree Right Side View&lt;/strong&gt; problem proved to be an enjoyable dynamic visualization exercise, though &lt;strong&gt;Maximum Level Sum of a Binary Tree&lt;/strong&gt; introduced the level-wise calculations complication into the mix. Altogether, the mentioned tasks demonstrated the effectiveness of BFS for solving binary tree problems as a multiple-task algorithm.  &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What’s Next?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;On Monday, I’ll wrap up week 13 with &lt;strong&gt;Binary Search Tree Problems&lt;/strong&gt;, covering &lt;strong&gt;Search in a Binary Search Tree&lt;/strong&gt; and &lt;strong&gt;Delete Node in a BST&lt;/strong&gt;. These tasks will provide the opportunity to search and alter BST structures at a fast pace.  &lt;/p&gt;

&lt;p&gt;I appreciate you for following my journey. So let’s keep on going, keep on solving and keep thinking, keep learning and keep on evolving.  &lt;/p&gt;

</description>
    </item>
    <item>
      <title>DAY 63 Binary Tree DFS: Paths and Relationships</title>
      <dc:creator>Somuya Khandelwal</dc:creator>
      <pubDate>Wed, 18 Dec 2024 11:14:13 +0000</pubDate>
      <link>https://dev.to/somuya_khandelwal/day-63-binary-tree-dfs-paths-and-relationships-2lpc</link>
      <guid>https://dev.to/somuya_khandelwal/day-63-binary-tree-dfs-paths-and-relationships-2lpc</guid>
      <description>&lt;p&gt;Hello Everyone!  &lt;/p&gt;

&lt;p&gt;Continuing the discussion from the previous lessons of Week 13, Day 3 presented more topics related to &lt;strong&gt;Binary Tree DFS&lt;/strong&gt; as well as path dynamics and hierarchical organization of trees. Today’s challenges were interesting and motivating because it was necessary to go through the tasks carefully and understand how nodes interact with each other. It really is like drawing connections starting from the branches and twigs of any tree.&lt;/p&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;How the Day Played Out&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Longest ZigZag Path in a Binary Tree – Medium Level (II)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Determine the longest ZigZag path in a binary tree and list down their length. A ZigZag path consists of left and right child nodes in an up and down order on each level.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Used DFS to traverse the tree while maintaining two states:
Distance of the path while the previous step was taken.
Length of the path when the previous step was right.
Further extended it globally and made the modification to the global maximum length dynamic at each node.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
The zigzag path developing when the traversal changed direction was a fun echo of dynamic trail construction.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;LCA of Binary Tree (Medium Level)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Determine the parent of a two nodes present in a two node binary search tree.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Used recursive DFS to explore each subtree:
–In case the current node was either of the two nodes being searched for the algorithm was to return the current node.
– Reconstruct results from the two subtrees on both sides to discover the LCA.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
It was extraordinarily gratifying to watch over the emergence of the tree structure and determining the specific moment at which the tree became indistinguishable – it was like finding a hidden gene; the gene of the commonality.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Special Events Today&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dynamic Path Management:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Longest ZigZag Path in a Binary Tree&lt;/strong&gt; demonstrated how hard state traversal can maintain and control intricate paths within the algorithm.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hierarchical Understanding:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Problems such as &lt;strong&gt;Lowest Common Ancestor of a Binary Tree&lt;/strong&gt; made us focus on parent-child relation and node interaction.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Recursive Clarity:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Both problems showed how useful recursion is when it comes to handling hierarchal problems in a very fast way.  &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DFS Tracks Complex Paths:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
DFS-based issues such as the &lt;strong&gt;Longest ZigZag Path in a Binary Tree&lt;/strong&gt; show that the approach is capable of handling and controlling dynamic path-related challenges efficiently.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Understanding Node Relationships:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In &lt;strong&gt;Lowest Common Ancestor of a Binary Tree&lt;/strong&gt; this way of thinking that is how outright subtrees make the solutions makes hierarchical concepts easier.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Recursion Simplifies Depth Problems:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Recursive traversal is important so that when dealing with interconnected structures, the notation won’t be ambiguous.  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Reflections&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Longest ZigZag Path in a Binary Tree&lt;/strong&gt; was an interesting problem which required me to handle the directional vector constraint, while &lt;strong&gt;Lowest Common Ancestor of a Binary Tree&lt;/strong&gt; involved a level-specific relationship constraint. Combined with these tasks, it demonstrated that DFS is capable of solving dynamic and structural binary tree problems.  &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What’s Next?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The next day I will be covering &lt;strong&gt;Binary Tree BFS Problems&lt;/strong&gt;, I will address &lt;strong&gt;Binary Tree Right Side View&lt;/strong&gt; and &lt;strong&gt;Maximum Level Sum of a Binary Tree&lt;/strong&gt;. These tasks will prove my fitness for analyzing breadth-first traversal and when dealing with some operations at different levels.  &lt;/p&gt;

&lt;p&gt;Thank you for sticking with my blog throughout this series. The time has come to sum it up and say: let’s continue solving, learning, and developing as a team.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>DAY 62 Binary Tree DFS: Tracking and Summing</title>
      <dc:creator>Somuya Khandelwal</dc:creator>
      <pubDate>Wed, 18 Dec 2024 11:08:14 +0000</pubDate>
      <link>https://dev.to/somuya_khandelwal/day-62-binary-tree-dfs-tracking-and-summing-1obe</link>
      <guid>https://dev.to/somuya_khandelwal/day-62-binary-tree-dfs-tracking-and-summing-1obe</guid>
      <description>&lt;p&gt;Hello Everyone!  &lt;/p&gt;

&lt;p&gt;Day 2 of Week 13 brought more &lt;strong&gt;Binary Tree DFS Challenges&lt;/strong&gt;, focusing on tracking node properties and calculating specific path sums. These tasks required dynamic tracking of values during traversal, making the problems both engaging and rewarding. It felt like navigating a tree maze where every step revealed a new insight.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;How the Day Played Out&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Count Good Nodes in Binary Tree (Medium Difficulty)&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Count the number of "good nodes" in a binary tree. A node is good if the value of the node is greater than or equal to the maximum value along the path from the root to the node.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Used DFS to traverse the tree while maintaining the maximum value encountered along the path.
&lt;/li&gt;
&lt;li&gt;Incremented the count if the current node's value met the "good node" condition.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Dynamically updating the maximum value and seeing the "good nodes" light up during traversal felt like revealing a path of treasures.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Path Sum III (Medium Difficulty)&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Count the number of paths that sum up to a given value in a binary tree.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Used DFS with a prefix sum approach:
&lt;/li&gt;
&lt;li&gt;Maintained a hash map to store the cumulative sums at each node.
&lt;/li&gt;
&lt;li&gt;Checked if there was a path with a cumulative sum equal to the target by querying the hash map.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Watching the paths form dynamically and counting the valid ones felt like solving a treasure map with hidden routes.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;Hello Everyone!  &lt;/p&gt;

&lt;p&gt;The second day of Week 13 created more &lt;strong&gt;Binary Tree DFS Challenges&lt;/strong&gt;, which addressed the node properties of a binary tree and tried to compute specific path sums. Both of these tasks necessitated appropriate manipulation of values during traversal and as such the problems were both fun and rewarding. They had a System of mapping knowledge to which studying was like solving a tree maze, with new ideas playing the role of path each time one turned around.&lt;/p&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;How the Day Unfolded&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Good Nodes in Binary Tree (Medium Level)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Determine how many “good nodes” are in a binary tree. A node is relinquish if the value of node is less than the maximum value of any of the path from the root to that node.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;
– Employed DFS to traverse the tree Looking for the path with the highest sum present in the tree.
– Used an increment on the counter variable if they saw a ‘good node’ at the current stage.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
It was like seeing a string of treasures when the “good nodes” light up, particularly as the max value is updated dynamically.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Path Sum III (Medium Level)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Calculate the number of paths from the root of a binary tree to its leaf nodes which has given sum.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Used DFS with a prefix sum approach:
Preervered a hash map in order to keep track of the cumulative sums on every node.
&lt;/li&gt;
&lt;li&gt;Whether there was a path with a certain cumulative sum, reached through the hash map.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
Updating the paths automatically and counting the coordinates for the valid ones kept the flow elegant, like treasure maps with concealed trails.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Todays highlights&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dynamic Value Tracking:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Both problems stressed to keep state information, or dynamic values (such as maximum and cumulative sum) during traversal.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hash Maps in Trees:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Path Sum III&lt;/strong&gt; showed how the use of hash maps on trees can make certain operations more manageable and straightforward, in the process increasing speed.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Real-Time Decisions:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Deciding what actions should be taken at runtime, including the process of identifying “good nodes” or valid paths introduced an interesting element to both.  &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DFS with Dynamic Tracking:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Issues such as – count good nodes in binary tree also underscore the usefulness of passing dynamic information such as maximums, during recursive call.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Prefix Sums Simplify Path Problems:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In the &lt;strong&gt;Path Sum III&lt;/strong&gt;, prefix sums and hash tables easily transformed a possibly quite difficult problem into one easy to solve.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Real-Time Analysis is Key:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Both problems involved dynamic values, whose analysis and furthermore, update, are done during traversal, highlighting the value of constant decision making.  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Reflections&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Count Good Nodes in Binary Tree&lt;/strong&gt; was an interesting one in tracking the optimum value of the nodes in the binary tree structure while the &lt;strong&gt;Path Sum III&lt;/strong&gt; was deeper in as made by deep use of prefix sum approach accompanied by path analysis. Combined, these activities demonstrated the effectiveness of DFS in solving binary tree problems with dynamic conditions.  &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What’s Next?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One day ahead, I have more &lt;strong&gt;Binary Tree DFS Problems&lt;/strong&gt;, which include &lt;strong&gt;Longest ZigZag Path in a Binary Tree&lt;/strong&gt; and &lt;strong&gt;Lowest Common Ancestor of a Binary Tree&lt;/strong&gt;. These tasks will help me to practice path dynamics, and hierarchical relationship processes effectively.  &lt;/p&gt;

&lt;p&gt;That is all for today folks, thank you for you’re company and for following my daily rhythms! Let me continue to solve, learn, and progress as one community with you.  &lt;/p&gt;

</description>
    </item>
    <item>
      <title>DAY 61 Binary Tree DFS: Depth and Similarity</title>
      <dc:creator>Somuya Khandelwal</dc:creator>
      <pubDate>Wed, 18 Dec 2024 11:07:31 +0000</pubDate>
      <link>https://dev.to/somuya_khandelwal/day-61-binary-tree-dfs-depth-and-similarity-136f</link>
      <guid>https://dev.to/somuya_khandelwal/day-61-binary-tree-dfs-depth-and-similarity-136f</guid>
      <description>&lt;p&gt;Hello Everyone!  &lt;/p&gt;

&lt;p&gt;Week 13 started with a focus on &lt;strong&gt;Binary Tree Problems Using Depth-First Search (DFS)&lt;/strong&gt;. Today’s tasks required exploring binary tree structures to calculate depths and compare nodes, showcasing the elegance of recursive and iterative tree traversal. It felt like diving into a hierarchical world, understanding its structure step by step.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;How the Day Played Out&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Maximum Depth of Binary Tree (Easy Difficulty)&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Calculate the maximum depth of a binary tree.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Used DFS recursively to traverse the tree.
&lt;/li&gt;
&lt;li&gt;At each node, calculated the depth by taking the maximum of the depths of the left and right subtrees, adding &lt;code&gt;1&lt;/code&gt; for the current node.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Watching the recursion unfold and the depth stack build dynamically felt like exploring levels of a virtual tree.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Leaf-Similar Trees (Medium Difficulty)&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Determine if two binary trees are leaf-similar, meaning they have the same leaf sequence.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Used DFS to traverse both trees, collecting the leaf nodes in lists.
&lt;/li&gt;
&lt;li&gt;Compared the lists to check if the leaf sequences matched.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Extracting and comparing the leaf sequences was like finding and matching hidden treasures within the trees.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What Made Today Special&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Recursive Elegance:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Both problems showcased the power of recursion in traversing hierarchical structures efficiently.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Comparative Analysis:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Leaf-Similar Trees&lt;/strong&gt; emphasized the importance of comparing data extracted during traversal, adding depth to the problem-solving process.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Visualizing Trees:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Thinking of the binary tree as a hierarchical map made the traversal process intuitive and engaging.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;Hello Everyone!  &lt;/p&gt;

&lt;p&gt;The week 13 portal began with &lt;strong&gt;Binary Tree Problems Using Depth-First Search (DFS)&lt;/strong&gt; as its theme. As for today’s tasks, we had to search the depths of binary trees and compare their nodes and the elegance and beauty of recursive and iterative approaches to tree traversal. To carry on with the year, it was like diving into a world that saw a great hierarchy, in each step.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Looking at the Events of the Day&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;MAX Depth of Binary Tree (Basic Difficulty)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Constant –Predict the optimum depth of a binary tree  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;We also used DFS recursively to traverse the tree.
At calculation of some node, defined the depth of this node to be maximum of the depth of left and right subtrees plus ‘1’.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
The feel of watching recursion happening and seeing the depth stack being constructed proved to be like traversing through a virtual tree.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Leaf-Similar Trees (Medium Difficulty)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
To test if two binary trees are, or are not, each one’s leaf-similar the method is as follows;  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;They used “DFS” to traverse both trees maintaining the lists of leaf notes.
In case the first tree had a leaf sequence 1-2-4 while the second tree had the same sequence as 1-3-5, the program compared the two lists.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
Comparing the leaf sequences was like searching for a treasure and then finding it again in another tree.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;What made today special&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Recursive Elegance:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Both problems demonstrated how using recursion to move through a hierarchy would be efficient.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Comparative Analysis:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Leaf-Similar Trees&lt;/strong&gt; further stressed that only the data extracted at the time of traversal is considerable making the problem-solving deeper.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visualizing Trees:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Organizing the information within a binary tree form of a map was helpful because it made it easier to envision how the current level mapped onto the next level for traversal.  &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DFS Simplifies Tree Traversals:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
DFS is beautifully used in problems like &lt;strong&gt;Maximum Depth of Binary Tree&lt;/strong&gt; where to compute depths of the tree has been presented as a problem.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Collection Matters:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In &lt;strong&gt;Leaf-Similar Trees&lt;/strong&gt;, using the DFS path to collect and compare data of a tree demonstrates how data extracted can be used to formulate solutions.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Recursive Thinking is Powerful:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Recursion is more simpler for a tree based problem, as it provides clarity and direct thinking as for how to get through each layer.  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Reflections&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Maximum Depth of Binary Tree was quite straightforward which proved a comforting warming before addressing the chaotic &lt;strong&gt;Leaf-Similar Trees&lt;/strong&gt; problem where we had to compare between two trees. Combined, these tasks established how DFS can be effectively used in the solution of binary tree problems.  &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What’s Next?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Tomorrow, I’ll be working on &lt;strong&gt;Binary Tree DFS Problems&lt;/strong&gt; again, doing &lt;strong&gt;Count Good Nodes in Binary Tree&lt;/strong&gt; and &lt;strong&gt;Path Sum III&lt;/strong&gt;. These tasks will involve tracking of values in the given problem and calculate the paths that possess some characteristics.  &lt;/p&gt;

&lt;p&gt;Thank you for reading my diary! Let’s continue to solve problems, continue learning and continue improving as one.   &lt;/p&gt;

</description>
    </item>
    <item>
      <title>DAY 60 Linked Lists: Reversing and Maximizing</title>
      <dc:creator>Somuya Khandelwal</dc:creator>
      <pubDate>Wed, 18 Dec 2024 11:01:25 +0000</pubDate>
      <link>https://dev.to/somuya_khandelwal/day-60-linked-lists-reversing-and-maximizing-4oba</link>
      <guid>https://dev.to/somuya_khandelwal/day-60-linked-lists-reversing-and-maximizing-4oba</guid>
      <description>&lt;p&gt;Hello Everyone!  &lt;/p&gt;

&lt;p&gt;The final day of Week 12 focused on &lt;strong&gt;Linked List Problems&lt;/strong&gt;, specifically tasks that involved reversing and analyzing linked list structures. These challenges tested my ability to manipulate pointers and uncover patterns efficiently. It felt like reconstructing dynamic sequences and optimizing their relationships for maximum value.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;How the Day Played Out&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Reverse Linked List (Easy Difficulty)&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reverse a singly linked list iteratively.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Used three pointers:
&lt;/li&gt;
&lt;li&gt;One (&lt;code&gt;prev&lt;/code&gt;) to track the previous node,
&lt;/li&gt;
&lt;li&gt;One (&lt;code&gt;current&lt;/code&gt;) to track the current node,
&lt;/li&gt;
&lt;li&gt;And another (&lt;code&gt;next&lt;/code&gt;) to temporarily hold the next node during traversal.
&lt;/li&gt;
&lt;li&gt;Iteratively reversed the links between nodes until the end of the list.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Watching the pointers flip and rebuild the list backward was like rewinding a sequence into its original state.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Maximum Twin Sum of a Linked List (Medium Difficulty)&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Find the maximum twin sum of a linked list, where the twin nodes are pairs equidistant from the start and end.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Used a two-pointer technique after identifying the midpoint:
&lt;/li&gt;
&lt;li&gt;Split the list into two halves and reversed the second half.
&lt;/li&gt;
&lt;li&gt;Calculated the sum of corresponding nodes from both halves, tracking the maximum sum.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Combining nodes from two directions and observing the twin sums evolve was both challenging and rewarding.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What Made Today Special&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Pointer Mastery:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Both problems required precise handling of pointers, showcasing the importance of iterative traversal and structural manipulation.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Symmetry in Lists:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tasks like &lt;strong&gt;Maximum Twin Sum of a Linked List&lt;/strong&gt; highlighted the elegance of finding relationships and patterns in linked list structures.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Efficient Reversals:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The iterative reversal in &lt;strong&gt;Reverse Linked List&lt;/strong&gt; emphasized the power of breaking problems into clear, manageable steps.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Reversal is Foundational:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tasks like &lt;strong&gt;Reverse Linked List&lt;/strong&gt; showcase how reversing a list is a fundamental skill with broad applications.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Patterns Lead to Optimization:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Problems like &lt;strong&gt;Maximum Twin Sum of a Linked List&lt;/strong&gt; demonstrate how uncovering patterns (like twin nodes) simplifies complex calculations.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Divide and Conquer with Linked Lists:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Splitting and merging lists, as seen in both tasks, ensures efficient traversal and manipulation.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Reflections&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Reverse Linked List&lt;/strong&gt; problem was a satisfying exercise in iterative traversal and pointer manipulation, while &lt;strong&gt;Maximum Twin Sum of a Linked List&lt;/strong&gt; added depth with its symmetrical analysis and maximum calculations. Together, these challenges rounded off Week 12 with a strong emphasis on structure and optimization.  &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What’s Next?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;With Week 12 complete, I’m excited to plan Week 13, focusing on &lt;strong&gt;Dynamic Programming&lt;/strong&gt;, &lt;strong&gt;Advanced Tree Problems&lt;/strong&gt;, and &lt;strong&gt;Backtracking Challenges&lt;/strong&gt;. The upcoming week promises to be as exciting as it is challenging, pushing my skills even further.  &lt;/p&gt;

&lt;p&gt;Thank you for following along! Let’s keep solving, learning, and growing together.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>DAY 59 Linked Lists: Structuring and Reorganizing</title>
      <dc:creator>Somuya Khandelwal</dc:creator>
      <pubDate>Wed, 18 Dec 2024 11:00:02 +0000</pubDate>
      <link>https://dev.to/somuya_khandelwal/day-59-linked-lists-structuring-and-reorganizing-102o</link>
      <guid>https://dev.to/somuya_khandelwal/day-59-linked-lists-structuring-and-reorganizing-102o</guid>
      <description>&lt;p&gt;Hello Everyone!  &lt;/p&gt;

&lt;p&gt;Day 4 of Week 12 focused on &lt;strong&gt;Linked List Problems&lt;/strong&gt;, a foundational topic in programming that emphasizes efficient data structure manipulation. Today’s tasks required precise handling of pointers and restructuring nodes, showcasing the power of linked lists in solving real-world challenges. It felt like arranging dynamic building blocks into organized patterns.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;How the Day Played Out&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Delete the Middle Node of a Linked List (Medium Difficulty)&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remove the middle node of a singly linked list in one pass.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Used the two-pointer technique:
&lt;/li&gt;
&lt;li&gt;One pointer (&lt;code&gt;slow&lt;/code&gt;) moved one step at a time, while the other pointer (&lt;code&gt;fast&lt;/code&gt;) moved two steps.
&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;slow&lt;/code&gt; pointer identified the middle node when &lt;code&gt;fast&lt;/code&gt; reached the end.
&lt;/li&gt;
&lt;li&gt;Updated pointers to skip the middle node efficiently.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Watching the list adjust dynamically as the middle node was removed felt like solving a live connectivity puzzle.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Odd Even Linked List (Medium Difficulty)&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Group all nodes with odd indices together followed by nodes with even indices, maintaining relative order.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Used two separate pointers to track odd and even nodes.
&lt;/li&gt;
&lt;li&gt;Iteratively linked odd nodes together and even nodes together, reconnecting them at the end.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Seeing the list reorganize into neat odd and even groups was both satisfying and visually appealing.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What Made Today Special&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Pointer Precision:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Both problems emphasized the importance of managing pointers carefully to ensure the integrity of the linked list.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Real-Time Reorganization:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tasks like &lt;strong&gt;Odd Even Linked List&lt;/strong&gt; showcased how linked lists can be dynamically restructured without additional memory overhead.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Simplicity in Design:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Despite their complexity, both problems had elegant solutions rooted in clear logic and efficient traversal.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Two Pointers Simplify Traversals:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Problems like &lt;strong&gt;Delete the Middle Node of a Linked List&lt;/strong&gt; demonstrate the efficiency of two-pointer techniques for identifying and manipulating nodes.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Linked Lists Are Flexible:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Odd Even Linked List&lt;/strong&gt; highlighted how linked lists allow for dynamic reorganization without requiring extra space.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Think in Steps:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Breaking problems into traversal and update phases ensures clarity and correctness in linked list operations.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Reflections&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Delete the Middle Node of a Linked List&lt;/strong&gt; problem was a rewarding exercise in pointer manipulation and traversal, while &lt;strong&gt;Odd Even Linked List&lt;/strong&gt; added a creative twist with its reorganization challenge. Together, these tasks reinforced the versatility and importance of linked lists in solving structured problems.  &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What’s Next?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;On Monday, I’ll conclude Week 12 with more &lt;strong&gt;Linked List Problems&lt;/strong&gt;, tackling &lt;strong&gt;Reverse Linked List&lt;/strong&gt; and &lt;strong&gt;Maximum Twin Sum of a Linked List&lt;/strong&gt;. These tasks will challenge my ability to manage linked list reversals and symmetry.  &lt;/p&gt;

&lt;p&gt;Thank you for following along! Let’s keep solving, learning, and growing together.  &lt;/p&gt;

</description>
    </item>
    <item>
      <title>DAY 58 Queues in Motion: Managing Sequences</title>
      <dc:creator>Somuya Khandelwal</dc:creator>
      <pubDate>Wed, 18 Dec 2024 10:55:40 +0000</pubDate>
      <link>https://dev.to/somuya_khandelwal/day-58-queues-in-motion-managing-sequences-20k8</link>
      <guid>https://dev.to/somuya_khandelwal/day-58-queues-in-motion-managing-sequences-20k8</guid>
      <description>&lt;p&gt;Hello Everyone!  &lt;/p&gt;

&lt;p&gt;Day 3 of Week 12 focused on &lt;strong&gt;Queue Problems&lt;/strong&gt;, where sequential processing and maintaining order are paramount. Today’s tasks involved simulating real-world scenarios, from managing time-based requests to determining the outcome of a voting system. It felt like orchestrating a smooth flow of operations with precision and logic.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;How the Day Played Out&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Number of Recent Calls (Easy Difficulty)&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implement a class to track the number of requests received in the past 3000 milliseconds.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Used a queue to store the timestamps of incoming requests.
&lt;/li&gt;
&lt;li&gt;Removed timestamps older than 3000 milliseconds whenever a new request arrived.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Watching the queue dynamically adjust with each request felt like managing a live event log in real-time.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Dota2 Senate (Medium Difficulty)&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simulate a voting system between two parties, where each senator can ban an opponent. Determine the winning party.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Used two queues to track the indices of senators from each party.
&lt;/li&gt;
&lt;li&gt;Compared the indices to simulate bans, ensuring the earlier-indexed senator acted first.
&lt;/li&gt;
&lt;li&gt;Re-queued remaining senators for the next round.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Watching the queues shrink and seeing the game dynamics play out was like observing a political strategy game unfold.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Hello Everyone!  &lt;/p&gt;

&lt;p&gt;On Day 3 of Week 12 students were introduced to &lt;strong&gt;Queue Problems&lt;/strong&gt;, in which the order of operations is very important. Today’s assignments included imitating realistic situations – simple time requirements and a voting system outcome predictor. It felt like the flow of operation was something to do with logic and every thing seemed to be so well planned.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Course of the Day&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Easy Difficulty : Number of Recent Calls
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use a class to log the number of requests that has occurred in the last 3000 milliseconds.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;
Implemented a queue data structure which stored the timestamps of the received requests.
Erased all the time stamps below 3000 milliseconds every time a new query appeared.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
It was like watching the event log for a real live event where the queue changes with each request made.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Dota 2 Senate : It is a medium level difficulty of playing game on Dota 2 Senate Server Language Used : HTML, CSS, JavaScript.&lt;br&gt;&lt;br&gt;
– Play a presidential voting scenario between two parties which allows each senator to block an opponent. Determine the winning party.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;
Two queues were used to keep track of indices of senators from the two sides of the political divide.
To really make the two indices look like a send-off of the supposedly affected services, the one indexing the earlier senator moved first.

&lt;ul&gt;
&lt;li&gt;Re-wrote the remaining senators to be still on the next round.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
Seeing the queues get smaller and watching how the game progression pieced together was like watching a political strategy game.
---&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Malcolm Properties and Truly Unique Experiences&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Real-Time Processing:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Both problems were implemented with an inherent consideration of elements that can be changed and altered in a runtime, focusing on queue-based solutions.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simulating Scenarios:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Such assignments as &lt;strong&gt;Dota2 Senate&lt;/strong&gt; were as close to real-life dialogues as possible, which is why the problem-solving part is more stimulating than intimidating.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Queues in Action:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
They both elucidated the applicability of queues through consecutive data agenda alongside punctilious order in face of construct proactivity.  &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Queues Simplify Sequential Operations:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Issues such as &lt;strong&gt;Number of Recent Calls&lt;/strong&gt; serve to underscore how well queues work with time-related ortime-sequential information.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simulations Are Intuitive:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Such queue can easily implement and solve a real-world tasks as a &lt;strong&gt;Dota2 Senate&lt;/strong&gt; for example.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Order Matters:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Both problems emphasized the need to order client in queue to get the right solution as needed.  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Reflections&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Number of Recent Calls&lt;/strong&gt; problem was one of the simplest, and it was enjoyable to use queues for time analysis; &lt;strong&gt;Dota2 Senate&lt;/strong&gt; included another layer of decision-making. In aggregate, these problems demonstrated the operation and utility of queues when applied to a range of problems based on real-life scenarios.  &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What’s Next?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The next topic I will cover is &lt;strong&gt;Linked List Problems&lt;/strong&gt; but I will start with **Delete the Middle Node of a Linked List **and then do **Odd Even Linked List. These tasks will also help me to ensure that I am closely monitoring, managing as well as manipulate linked structures where needs be.  &lt;/p&gt;

&lt;p&gt;Many thanks for tuning in! So far, we have continued solving problems, learning, and developing together.  &lt;/p&gt;

</description>
    </item>
    <item>
      <title>DAY 57 Stacks in Action: Decoding and Collisions</title>
      <dc:creator>Somuya Khandelwal</dc:creator>
      <pubDate>Wed, 18 Dec 2024 10:54:21 +0000</pubDate>
      <link>https://dev.to/somuya_khandelwal/day-57-stacks-in-action-decoding-and-collisions-10fe</link>
      <guid>https://dev.to/somuya_khandelwal/day-57-stacks-in-action-decoding-and-collisions-10fe</guid>
      <description>&lt;p&gt;Hello Everyone!  &lt;/p&gt;

&lt;p&gt;Day 2 of Week 12 was centered on &lt;strong&gt;Stack Problems&lt;/strong&gt;, a fascinating area where nested operations and sequential dynamics come to life. Today’s challenges tested my ability to manage structured data flows efficiently, turning seemingly chaotic inputs into clear, actionable outputs. It felt like untangling a web step by step.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;How the Day Played Out&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Decode String (Medium Difficulty)&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decode an encoded string with patterns like &lt;code&gt;3[a2[c]]&lt;/code&gt; into its expanded form.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Used a stack to keep track of characters and counts at different levels of nesting.
&lt;/li&gt;
&lt;li&gt;Whenever a closing bracket (&lt;code&gt;]&lt;/code&gt;) was encountered, popped elements from the stack and built the decoded string for the current level.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Watching the nested decoding unfold layer by layer felt like peeling back the layers of a complex puzzle.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Asteroid Collision (Medium Difficulty)&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simulate collisions between asteroids in a row, where larger asteroids destroy smaller ones moving in the opposite direction.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Used a stack to represent asteroids that remain after each collision.
&lt;/li&gt;
&lt;li&gt;Compared the top of the stack with the current asteroid, resolving collisions dynamically.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Observing the collisions play out in real-time and seeing which asteroids survived felt like watching a mini space simulation.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Hello Everyone!  &lt;/p&gt;

&lt;p&gt;On Day 2 of Week 12, lessons focused on &lt;strong&gt;Stack Problems&lt;/strong&gt; where nested operation and sequential dynamics are realized. Today’s challenges have put a lot of pressure on managing input data streams, making it clear how one can take seemingly confusing data inputs and organize them into outputs that are easily understandable. That decision making process seemed something like peeling an intricate spider’s web.&lt;/p&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;How the Day Played Out&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Decode String is a medium level problem, we have to reverse the characters in the string without changing their position in the string.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand an encoded string and expand strings with patterns such as &lt;code&gt;3[a2[c]]&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;
Utilized a stack for characters and counts that are nested within other characters at various levels.
Every time that a closing bracket (&lt;code&gt;]&lt;/code&gt;) was met, the program respectively popped elements and constructed the string of the current level of the decode.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
This format of nested decoding was like watching the heavenly puzzle unravel step by step or layer by layer in fact.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Asteroid Collision (Medium – Complexity)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In line with the motion, attempt to set up an impact model between a row of planets where larger planets obliterate smaller ones moving in the opposite direction.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;
Displayed the remaining asteroids using a stack to depict asteroids after each collision.
In contrast, compared the top of the stack with the current asteroid while handling collisions in realtime manner.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
Getting to see the collisions happen in real-time and then watch the asteroids survive was somewhat like watching a mini simulation space ballet.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;What Made Today Special&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Nested Operations:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Decode String&lt;/strong&gt; involved working with nested elements; an excellent opportunity to introduce stacks that allow working with hierarchically structured data.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dynamic Simulations:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Asteroid Collision place dynamic decision making at the heart of its experience, the ability to make changes on the fly was key.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Stacks at Work:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Both problems illustrated the use of stacks by providing an easy organization of the tasks while simplifying the process by keeping the intermediate states conspicuously organized.  &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Stacks Handle Nested Structures Elegantly:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Applications such as &lt;strong&gt;Decode String&lt;/strong&gt; bring out the orderly manner in which stacks approach, manipulate and solve nested operations.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Real-Time Adjustments Matter:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In &lt;strong&gt;Asteroid Collision&lt;/strong&gt;, people got to see how stacks could work with dynamic interactions and keep things in line when all hell broke loose.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clear Logic is Key:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Both issues confirmed that all operations should be divided into actionable steps, and each step must work towards creating the end solution.  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Reflections&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Decode String&lt;/strong&gt; problem fell right into the category of enhancing the exclusive patterns with conjoint and successive outcomes and managing many patterns and building outputs &lt;strong&gt;Asteroid Collision&lt;/strong&gt; operation was quite unique and associated with real time decisions. Combined, these tasks demonstrated versatility of stacks in approaching different problems.  &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What’s Next?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This is the plan I have for tomorrow → &lt;strong&gt;Queue Problems&lt;/strong&gt; → &lt;strong&gt;Number of Recent Calls&lt;/strong&gt;, &lt;strong&gt;Dota2 Senate&lt;/strong&gt;. The following will exert some pressure on my capability to handle a stream of tasks that require a simultaneous handling using queues.  &lt;/p&gt;

&lt;p&gt;It was great to have you join us until the end. Let’s continue solving, evolving, and improving as a learning community.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>DAY 56 Hash Maps and Strings: Unlocking Patterns</title>
      <dc:creator>Somuya Khandelwal</dc:creator>
      <pubDate>Wed, 18 Dec 2024 10:48:09 +0000</pubDate>
      <link>https://dev.to/somuya_khandelwal/day-56-hash-maps-and-strings-unlocking-patterns-2dom</link>
      <guid>https://dev.to/somuya_khandelwal/day-56-hash-maps-and-strings-unlocking-patterns-2dom</guid>
      <description>&lt;p&gt;Hello Everyone!  &lt;/p&gt;

&lt;p&gt;Tasks for the first two days of Week 12 were oriented on &lt;strong&gt;Hash Maps, Sets, and String Manipulations&lt;/strong&gt;. Today I had a nice workout because today’s challenges are oriented on working with structured data and problems based on symmetry and string transformation. It was a satisfying beginning, since it intertwined logical approach and measurement.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;How the Day Unfolded&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;This category would involve equal row and column pairs; that is, the degree of difficulty of this category would be medium.&lt;br&gt;&lt;br&gt;
Describe how many pairs of rows and of columns are equal in a grid.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;
Constructed a hash map to preserver frequencies of rows which are represented as tuples.
Transposed columns into tuples and counted whether the number of matching pairs was in the hash map.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
When threading patterns in the grid that are symmetrical made me feel like I was solving a puzzle!
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;*&lt;em&gt;Step 3 of 19 – Medium Level – Removing Stars From a String&lt;br&gt;&lt;br&gt;
– Replace characters in a string with modifications according to rules of operator ‘&lt;/em&gt;’, which deletes the prior character.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;
.");&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Part 5: Include the following lines in your submission
&lt;/h1&gt;

&lt;h1&gt;
  
  
  [Millen’s research study] =&amp;gt; [Sears’ textual research study]
&lt;/h1&gt;

&lt;p&gt;The following textual research study was conducted by Sears: &lt;/p&gt;

&lt;p&gt;[Millen’s research study] =&amp;gt; [Sears’ textual research study]  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
 It was gratifying to watch the string change on the fly as stars subtracted characters – it felt like watching an item of text being modified in real life.
&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;Parts of Today&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Patterns and Symmetry:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Interestingly, the previously proposed grid-based logic in &lt;strong&gt;Equal Row and Column Pairs&lt;/strong&gt; emphasized the beauty of looking for patterns and studying the ways to make use of the symmetrical approaches in the analyzing of structured data.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Stack Dynamics:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Removing Stars From a String&lt;/strong&gt; explained that special simple string operations might be actually performed using stacks.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Structures in Action:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Both problems, hash maps and stacks, highlighted the role of selecting correct data forms to solve problems.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hash Maps for Symmetry:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Some problems like &lt;strong&gt;Equal Row and Column Pairs&lt;/strong&gt; demonstrate how hash maps are used for keeping and searching for a set of structured data that corresponds to the pattern.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Stacks Simplify Reversals and Edits:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
– The use of stacks in handling reversals and dynamic sequential modifications was illustrated in **Removing Stars From a String”.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Break Problems into Logical Steps:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In both the tasks, rigid sequential work flow was adopted because it helps in being very clear and precise in the – &amp;gt;(specification and) implementation–&amp;gt; of tasks.  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Reflections&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Equal Row and Column Pairs&lt;/strong&gt; problem was a fun problem in looking for pattern and dealing with symmetry part and &lt;strong&gt;Removing Stars From a String&lt;/strong&gt; was a reminder of how powerful stack based solution are in handling dynamic changes. In aggregate, these tasks highlighted the need to integrate principles of solving problems and properly structured data.  &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What’s Next?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The next day I will concentrate on &lt;strong&gt;Stack Problems&lt;/strong&gt;, solving &lt;strong&gt;Decode String&lt;/strong&gt; problem and &lt;strong&gt;Asteroid Collision&lt;/strong&gt; problem. The above tasks will be hard tasks to solve since they concern nested processes and sequential processes.  &lt;/p&gt;

&lt;p&gt;Well there you have it folks thank you for reading along this week! Well then let’s continue to solve, learn and progress as a society.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>DAY 55 Wrapping Up with Hash Maps and Sets</title>
      <dc:creator>Somuya Khandelwal</dc:creator>
      <pubDate>Wed, 18 Dec 2024 10:46:59 +0000</pubDate>
      <link>https://dev.to/somuya_khandelwal/day-55-wrapping-up-with-hash-maps-and-sets-459i</link>
      <guid>https://dev.to/somuya_khandelwal/day-55-wrapping-up-with-hash-maps-and-sets-459i</guid>
      <description>&lt;p&gt;Hello Everyone!  &lt;/p&gt;

&lt;p&gt;The last day of Week 11 was dedicated to such part as &lt;strong&gt;Hash Map/Set Problems&lt;/strong&gt; which united topics of relations between data and symmetry. The following tasks made me consider examples of how to manage and analyze data using hashing as part of of part of the solution. I felt that I was trying to sort and arrange tangled jungles of patterns for better order and symmetry.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Pep Hunt: How the Day Played Out&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;If two strings are similar (recommended as a medium level)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Decide if there are a couple of strings whose characters differ in frequency and can be transformed into one another through the swapping of similar characters.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;
Counted/create hash maps of characters for strings for character count frequencies.
Ensured that both strings contained the same unique characters and the frequency set.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
Comparing the frequencies of the characters was rather like solving a cipher.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;**Equal Row and Column Pairs There are four pair of rows and columns with equal letters and numbers in medium difficulty Sudoku table.&lt;br&gt;&lt;br&gt;
– sum of values where two rows and two columns match.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;
For , frequency of rows were required as tuples so a hash map was used.
To look for a matching pair of elements, for each column formed a tuple and checked whether this particular tuple exists in the hash map.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
Analyzing symmetry between rows and columns gave me the impression of a detective tracing enigma in a matrix.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;Special things About today&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Symmetry in Data:&lt;/strong&gt;
Both problems underlined the search for and utilization of balance – in strings or grids – to decipher complicated relationships.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hash Map Efficiency:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Activities like &lt;strong&gt;Equal Row and Column Pairs&lt;/strong&gt; revealed how hash maps enhance sorts and storage hence minimizing computational expenses.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Real-World Relevance:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
These problems resembled real-life types of analysis, for example, comparing two or more sets of data or investigation of interactions in the structural data.  &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hash Maps Simplify Relationships:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The control of character frequencies to the rank and control of row and column mappings show how hash maps are applicable to relational data.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Symmetry Reduces Complexity:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Finally, &lt;strong&gt;Equal Row and Column Pairs&lt;/strong&gt; employed in the model bring additional value into recognition and usage of symmetrical patterns into calculations that in turn decrease rates of redundant computations.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pattern Recognition is Key:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In both tasks, a focus was made on pattern recognition and dissection of issues into sub-components.  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Reflections&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Determine if Two Strings Are Close&lt;/strong&gt; problem was rather fun to think about in terms of comparing relations between character frequencies, and &lt;strong&gt;Equal Row and Column Pairs&lt;/strong&gt; showed how even arrays could be beautiful if they are symmetric. Combined, these partials concluded Week 11 with a reasonable combination of logical analysis, optimization and regularity.  &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What’s Next?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Thus, with Week 11 coming to an end, it’s time to move to Week 12’s schedule, which is &lt;strong&gt;Dynamic Programming&lt;/strong&gt;, &lt;strong&gt;Graph Problems&lt;/strong&gt;, and &lt;strong&gt;Backtracking Challenges&lt;/strong&gt;. As the upcoming week has in store more challenges and higher level thinking assignments, the solution to the problems is expected to continue.  &lt;/p&gt;

&lt;p&gt;I would like to thank you for following me! Let’s continue to do our best in solving, learning and growing as a team&lt;/p&gt;

</description>
    </item>
    <item>
      <title>DAY 54 Hash Maps and Sets: Unlocking Efficiency</title>
      <dc:creator>Somuya Khandelwal</dc:creator>
      <pubDate>Wed, 18 Dec 2024 10:39:51 +0000</pubDate>
      <link>https://dev.to/somuya_khandelwal/day-54-hash-maps-and-sets-unlocking-efficiency-e2k</link>
      <guid>https://dev.to/somuya_khandelwal/day-54-hash-maps-and-sets-unlocking-efficiency-e2k</guid>
      <description>&lt;p&gt;Hello Everyone!  &lt;/p&gt;

&lt;p&gt;On the fourth day of the eleventh week, the topics that were covered were &lt;strong&gt;Hash Map/Set Problems&lt;/strong&gt; since the main and maybe the only priority here is efficiency. These tasks underlined the efficiency of dealing with data structures, of asking questions to the underlying data, of transforming what potentially could have been complex operations into rather simple and refined uses. This I found was like looking for clues and assembling it to solve puzzles.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Au joué quoi à搞23899830了駅】#### **How the Day Went&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Find the Difference of Two Arrays **Easy Difficulty&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Return two lists: to construct the arrays of one such type that contains elements which are not present in the first array and one that contains only elements that are not in the second array.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;
Primarily utilized two sets to preserve separate elements out of two arrays.
The differences were determined by set based operations such set difference (difference), and set intersection.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
Besides, seeing the sets coming together and then figuring out elements that need to be separated was like solving jigsaw of two partially overlapping puzzles.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;*&lt;em&gt;Unique Number of Occurrences Based on The Level of Difficulty : Easy *&lt;/em&gt;&lt;br&gt;&lt;br&gt;
Figure out whether all the elements in the array have a different frequency.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Strategy:&lt;/strong&gt;
&lt;em&gt;saved _counted the frequency of each element using the hash map&lt;/em&gt;.
H: searched whether the numbers set in the hash map were distinct with hashmap’s value (frequencies) utilizing hash set.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fun Part:&lt;/strong&gt;
Avoiding the scenario where the frequencies overlapped felt like keeping a stock accurate.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;things that made today special&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Efficiency through Hashing:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
These two problems showcased the ability of hash maps and sets in faster and efficient control of data.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clean and Modular Logic:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Some of the tasks, which have been solved, like &lt;strong&gt;Unique Number of Occurrences&lt;/strong&gt;, illustrated the ways to divide a given problem into a set of more manageable and well-defined parts that guarantee both clear understanding of the problem and its proper solution.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Practical Problem-Solving:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Recall that the utilization of hash based structures, resembles the approach to working with datasets or fine tuning a database query.  &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Set Operations Simplify Differences:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Problems like &lt;strong&gt;Find the Difference of Two Arrays&lt;/strong&gt; show how set operations reduce the complexity of comparing large datasets.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Hash Maps Are Invaluable:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Counting elements and verifying uniqueness, as in &lt;strong&gt;Unique Number of Occurrences&lt;/strong&gt;, reinforces the importance of hash maps in competitive programming.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Modular Thinking Enhances Clarity:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dividing tasks into distinct steps (e.g., counting, checking uniqueness) ensures solutions are easier to implement and debug.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Reflections&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Working on the problem &lt;strong&gt;Find the Difference of Two Arrays&lt;/strong&gt; proved to me how set operations could simplify comparative work, while &lt;strong&gt;Unique Number of Occurrences&lt;/strong&gt; gauged my ability to handle and query hash-based structures efficiently. These challenges highlighted the importance of hashing for solving real-life problems efficiently.  &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What’s Next?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;On Monday, I’ll wrap up Week 11 with more &lt;strong&gt;Hash Map/Set Problems&lt;/strong&gt;, tackling &lt;strong&gt;Determine if Two Strings Are Close&lt;/strong&gt; and &lt;strong&gt;Equal Row and Column Pairs&lt;/strong&gt;. Those will prove challenging with respect to my skills of managing relationships and symmetry in datasets.  &lt;/p&gt;

&lt;p&gt;Thanks for staying tuned! Here’s to solving, learning, and growing together!&lt;/p&gt;

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