<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Priya Gupta on Medium]]></title>
        <description><![CDATA[Stories by Priya Gupta on Medium]]></description>
        <link>https://medium.com/@priyagupta7272?source=rss-51c3f5e57903------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gfYsU6uSZzgFK4SleRrL5g.jpeg</url>
            <title>Stories by Priya Gupta on Medium</title>
            <link>https://medium.com/@priyagupta7272?source=rss-51c3f5e57903------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 05:07:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@priyagupta7272/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[3 Quick Steps for Schema Design in SQL]]></title>
            <link>https://medium.com/@priyagupta7272/3-quick-steps-schema-design-in-sql-475430b88a1a?source=rss-51c3f5e57903------2</link>
            <guid isPermaLink="false">https://medium.com/p/475430b88a1a</guid>
            <category><![CDATA[database-design]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[schema-design]]></category>
            <category><![CDATA[schema]]></category>
            <dc:creator><![CDATA[Priya Gupta]]></dc:creator>
            <pubDate>Mon, 05 Aug 2024 17:48:53 GMT</pubDate>
            <atom:updated>2024-08-05T17:49:48.104Z</atom:updated>
            <content:encoded><![CDATA[<p>Starting to work on schema design in SQL involves several steps to ensure you create an efficient and scalable database. Here’s a structured approach to guide you through the Steps:</p><h3>Step 1 : Identify Entities and It’s Attributes:</h3><p><strong>Nouns as Entities:</strong> Look for nouns in the requirements. These nouns often represent entities. For example, in a sales system, common nouns might include Customer, Order, Product, and Invoice.</p><p><strong>Attributes from Requirements:</strong> Look at the detailed requirements and identify what information needs to be captured for each entity. For example, a Customer entity might have attributes like FirstName, LastName, Email, and PhoneNumber.</p><h3>Step 2: Establish Relationships:</h3><p><strong>Associations:</strong> Identify how entities are related to each other. This helps in determining foreign keys and defining relationships (one-to-one, one-to-many, many-to-many).</p><p><strong>Verbs as Relationships:</strong> Look for verbs in the requirements. These often describe actions or relationships between entities. For example, “a Customer places an Order” indicates a relationship between the Customer and Order entities.</p><h3>Step 3: Normalization:</h3><p><strong>Remove Redundancies:</strong> Ensure that the attributes are stored only once and in the most appropriate entity. This involves normalizing the data to eliminate redundancy and ensure data integrity.</p><p>Example:</p><p>Schema design question: A platform hosting multiple restaurants, each with its unique identifier, menu pricing, and operating hours. Each restaurant operates in multiple locations with delivery charges and taxes. Customers from various locations can place orders containing multiple dishes from multiple restaurants. The orders track dish details, quantities, prices, taxes, delivery charges, and delivery status. Customers can also rate and review each dish from the restaurants, and these ratings and reviews are visible to all customers. A loyalty and reward program for customers includes tracking of points earned and redeemed. A system for handling orders, refunds, and changes. A system for managing restaurant partnerships, including agreement commission rates and performance metrics. An employee management system for delivery personnel, including their schedule, area of operation, delivery record, and ratings by customers.</p><p>— — — — — — — — — — — — — -Write the solution in comment — — — — — — — — —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=475430b88a1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Amazon Prime Might Transition from a Distributed System to a Monolith: Analyzing the Pros and…]]></title>
            <link>https://medium.com/@priyagupta7272/why-amazon-prime-might-transition-from-a-distributed-system-to-a-monolith-analyzing-the-pros-and-75fba15a55a4?source=rss-51c3f5e57903------2</link>
            <guid isPermaLink="false">https://medium.com/p/75fba15a55a4</guid>
            <category><![CDATA[latest-updates]]></category>
            <category><![CDATA[latest-news]]></category>
            <category><![CDATA[monolithic-architecture]]></category>
            <category><![CDATA[dsa-convention]]></category>
            <category><![CDATA[amazon]]></category>
            <dc:creator><![CDATA[Priya Gupta]]></dc:creator>
            <pubDate>Sun, 04 Aug 2024 16:42:29 GMT</pubDate>
            <atom:updated>2024-08-04T16:42:29.590Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why Amazon Prime Might Transition from a Distributed System to a Monolith: Analyzing the Pros and Cons</h3><p>In recent years, the trend in software architecture has been moving towards distributed systems and microservices, with major players like Amazon Prime leading the charge. However, there is a growing conversation around the potential benefits of reverting to a monolithic architecture. While there is no concrete evidence that Amazon Prime has made such a transition, it is worth exploring why a major platform might consider this move. This blog delves into the reasons and implications of shifting from a distributed system to a monolithic architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*HIlqAtrJcqFgjBDZmWsvuQ.png" /></figure><p><strong>Understanding Distributed Systems and Monolithic Architectures</strong></p><p><strong>Distributed Systems:</strong> A distributed system is one where multiple interconnected components, often microservices, work together to form a cohesive application. Each service is typically responsible for a specific piece of functionality and communicates with other services over a network.</p><p><strong>Monolithic Architecture: </strong>A monolithic architecture, on the other hand, is a single unified codebase where all components of the application are interconnected and run as a single process. Changes in one part of the system can affect the entire application, but everything operates within the same context.</p><p><strong>Potential Reasons for Amazon Prime to Transition to a Monolith</strong></p><p>1. <strong>Simplification of Development and Deployment</strong></p><p>In a distributed system, each microservice needs to be developed, tested, deployed, and maintained independently. This complexity can lead to significant overhead in terms of managing deployment pipelines, versioning, and inter-service communication. A monolithic architecture simplifies this process by consolidating everything into a single codebase, which can streamline development and deployment activities.</p><p>2. <strong>Performance Optimization</strong></p><p>One of the key advantages of a monolithic architecture is performance. In a distributed system, inter-service communication typically occurs over a network, which introduces latency and overhead. By contrast, a monolithic application can operate faster since all components interact within the same process. This can be particularly beneficial for applications like Amazon Prime that require high performance and responsiveness.</p><p>3. <strong>Easier Testing and Debugging</strong></p><p>Testing and debugging a distributed system can be challenging due to the complexity of interactions between services. Each service needs to be tested both in isolation and as part of the larger system, which can be time-consuming and difficult to manage. A monolithic architecture, where all components are within the same application context, makes it easier to trace issues, perform end-to-end testing, and ensure consistency.</p><p>4. <strong>Resource Management</strong></p><p>Distributed systems often require significant resources to manage multiple instances of services, handle network communication, and maintain high availability. A monolithic architecture can be more resource-efficient, as it reduces the need for duplicate instances and can more effectively manage memory and processing power within a single process.</p><p>5. <strong>Consistency and Integration</strong></p><p>In a distributed system, achieving data consistency across multiple services can be a complex task. Transactions that span multiple services require careful coordination to ensure consistency, which can be error-prone and challenging to implement. A monolithic architecture inherently ensures consistency as all components share the same database and operate within the same transaction context.</p><p><strong>Potential Drawbacks of a Monolithic Architecture</strong></p><p>While a monolithic architecture offers several benefits, it also comes with its own set of challenges:</p><p>- <strong>Scalability</strong>: Scaling a monolithic application can be more difficult compared to a distributed system. In a monolith, the entire application must be scaled together, which can lead to inefficiencies and increased resource consumption.</p><p>- <strong>Flexibility</strong>: A monolithic architecture can be less flexible when it comes to adopting new technologies or making changes to specific components. Any change requires redeploying the entire application, which can slow down development cycles.</p><p>- <strong>Resilience</strong>: In a monolithic system, a failure in one part of the application can potentially bring down the entire system. Distributed systems, by design, can isolate failures and continue to operate even if one service goes down.</p><p><strong>Conclusion</strong></p><p>While the industry trend has largely favored distributed systems and microservices, there are valid reasons why a major platform like Amazon Prime might consider transitioning to a monolithic architecture. Simplified development and deployment, performance optimization, easier testing and debugging, resource management, and ensuring consistency are compelling arguments for such a move. However, it’s essential to weigh these benefits against the potential drawbacks of scalability, flexibility, and resilience.</p><p>Ultimately, the choice between a monolithic and a distributed architecture depends on the specific needs and constraints of the application. As technology continues to evolve, so too will the architectural paradigms that best serve the needs of large-scale applications like Amazon Prime.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75fba15a55a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Graphs in DSA]]></title>
            <link>https://medium.com/@priyagupta7272/graphs-in-dsa-d5362fe83492?source=rss-51c3f5e57903------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5362fe83492</guid>
            <category><![CDATA[dsa-training]]></category>
            <category><![CDATA[dsa-convention]]></category>
            <category><![CDATA[coding-interviews]]></category>
            <category><![CDATA[graph]]></category>
            <category><![CDATA[dsa-courses]]></category>
            <dc:creator><![CDATA[Priya Gupta]]></dc:creator>
            <pubDate>Sun, 04 Aug 2024 16:31:52 GMT</pubDate>
            <atom:updated>2024-08-04T16:31:52.982Z</atom:updated>
            <content:encoded><![CDATA[<p>Graphs are the data structure in computer science that are widely used in various applications like <strong>networking</strong>, <strong>social networks etc</strong>.</p><p>In Java, graphs can be represented in different ways on use cases and specific requirements.</p><p>Let’s explore the types of graphs and it’s representations:</p><h3>Types of Graphs</h3><ol><li><strong>Directed Graph</strong>: A graph in which edges have a direction. For example, if there is an edge from node A to node B, it means you can go from A to B but not necessarily from B to A as given in the below mention diagram.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*1XWkHODKX44H1Bfj5zOjEA.png" /></figure><ol><li><strong>Undirected Graph</strong>: A graph in which edges do not have a direction. If there is an edge between node 1 and node 2, you can travel both ways between them.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/1*iVhd6SrLptC0aDTtJsmCqg.png" /></figure><h3>Graph Representations</h3><ol><li><strong>Adjacency Matrix</strong>:</li></ol><ul><li><strong>Description</strong>: A 2D array where matrix[i][j] is non-zero if there is an edge from vertex i to vertex j. In the case of an unweighted graph, matrix[i][j] will be 1 if there is an edge; for weighted graphs, it will store the weight of the edge.</li><li><strong>Use Case</strong>: Suitable for dense graphs where the number of edges is large compared to the number of vertices. It allows for quick lookups to check the presence of an edge.</li></ul><blockquote>int[][] adjacencyMatrix = new int[numVertices][numVertices];<br>// For an edge from vertex u to vertex v with weight w<br>adjacencyMatrix[u][v] = w;</blockquote><p>2. <strong>Adjacency List</strong>:</p><ul><li><strong>Description</strong>: An array of lists. The index of the array represents a vertex, and the list at each index contains the vertices adjacent to the vertex represented by the index.</li><li><strong>Use Case</strong>: Suitable for sparse graphs where the number of edges is relatively low compared to the number of vertices. It uses less memory compared to an adjacency matrix.</li></ul><blockquote>List&lt;List&lt;Integer&gt;&gt; adjacencyList = new ArrayList&lt;&gt;();<br>for (int i = 0; i &lt; numVertices; i++) {<br> adjacencyList.add(new ArrayList&lt;&gt;());<br>}<br>// For an edge from vertex u to vertex v<br>adjacencyList.get(u).add(v);</blockquote><h3>Choosing Between Adjacency Matrix and Adjacency List</h3><p><strong>Adjacency Matrix</strong>:</p><p>Pros:</p><ul><li>Fast lookups for edge presence: O(1)</li><li>Simple and straightforward implementation.</li></ul><p>Cons:</p><ul><li>Consumes more space, especially for sparse graphs: O(V^2) where V is the number of vertices.</li></ul><p><strong>Adjacency List</strong>:</p><p>Pros:</p><ul><li>Space-efficient for sparse graphs: O(V + E) where E is the number of edges</li><li>Easier to iterate over all edges</li></ul><p>Cons:</p><ul><li>Checking for edge presence is slower: O(V).</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5362fe83492" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Level Order Traversal — Deepest leaf node sum | Java]]></title>
            <link>https://medium.com/@priyagupta7272/level-order-traversal-deepest-leaf-node-sum-java-5e3c1b2b8047?source=rss-51c3f5e57903------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e3c1b2b8047</guid>
            <category><![CDATA[level-order-traversal]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[sad]]></category>
            <dc:creator><![CDATA[Priya Gupta]]></dc:creator>
            <pubDate>Tue, 03 Oct 2023 23:42:14 GMT</pubDate>
            <atom:updated>2023-10-03T23:42:14.898Z</atom:updated>
            <content:encoded><![CDATA[<h3>Level Order Traversal — Deepest leaf node sum | Java</h3><p>Question Given a root node to a tree, find the sum of all the leaf nodes that are at maximum depth from the root node.</p><p><strong>Example:</strong></p><pre>      10<br>    /   \<br>   20    30<br>  / \   / \<br> 40 50 60 70</pre><pre>Input : root(in example it is 10)<br>Output : 220</pre><pre>Explanation:<br>Nodes at maximum depth are: 40, 50, 60, 70. <br>So, sum of these nodes = 220</pre><pre>Solution - </pre><pre><br>import java.util.*;<br>class HelloWorld {<br> public static class Node{<br> int val;<br> Node left;<br> Node right;<br> Node(int val){<br> this.val = val;<br> this.left = this.right = null;<br> }<br> }<br> public static void main(String[] args) {<br> Node root = new Node(10);<br> Node n1 = new Node(20);<br> Node n2 = new Node(30);<br> Node n3 = new Node(40);<br> Node n4 = new Node(50);<br> Node n5 = new Node(60);<br> Node n6 = new Node(70);<br> root.left = n1;<br> root.right = n2;<br> n1.left = n3;<br> n1.right = n4;<br> n2.left = n5;<br> n2.right = n6;<br> <br> Queue&lt;Node&gt; que = new ArrayDeque&lt;&gt;();<br> <br> <br> que.add(root);<br> int sum=0;<br> while(que.size()&gt;0){<br> sum = 0;<br> int sz = que.size();<br> <br> for(int i =0;i&lt;sz;i++){<br> Node rem = que.remove();<br> sum+=rem.val;<br> if(rem.left!=null)<br> que.add(rem.left);<br> if(rem.right!=null)<br> que.add(rem.right);<br> }<br> }<br> <br> System.out.print(“Sum of last Nodes of the tree is : “+sum);<br> }<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e3c1b2b8047" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spectacular Display of Starlink Satellites and Supermoon Illuminates Night Sky over Chattanooga and…]]></title>
            <link>https://medium.com/@priyagupta7272/spectacular-display-of-starlink-satellites-and-supermoon-illuminates-night-sky-over-chattanooga-and-7aa99b12356e?source=rss-51c3f5e57903------2</link>
            <guid isPermaLink="false">https://medium.com/p/7aa99b12356e</guid>
            <category><![CDATA[chattanooga]]></category>
            <category><![CDATA[georgia]]></category>
            <category><![CDATA[spacex]]></category>
            <category><![CDATA[starlink-satellites]]></category>
            <category><![CDATA[science]]></category>
            <dc:creator><![CDATA[Priya Gupta]]></dc:creator>
            <pubDate>Tue, 08 Aug 2023 06:09:02 GMT</pubDate>
            <atom:updated>2023-08-08T06:09:02.406Z</atom:updated>
            <content:encoded><![CDATA[<h3>Spectacular Display of Starlink Satellites and Supermoon Illuminates Night Sky over Chattanooga and North Georgia</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Aox1e8HOs5bauOn0hmFsnQ.jpeg" /><figcaption>Bright lights</figcaption></figure><p>Numerous bright lights observed moving in a straight trajectory across the sky were visible in the regions of Chattanooga and North Georgia on the evening of Monday. This celestial event managed to capture the attention of various individuals, some of whom found the occurrence rather unexpected.</p><p>Erica Sahaj, an occupant of Sign Mountain, described during a phone interview that she was taken part in watering her plants around 10 p.m. at the point when she ended up looking upwards and witness the presence of brilliant lights. At first expecting these lights to be the stars comprising the Orion’s Belt heavenly body, she before long understood their development, driving her to determine that they were particular from the previously mentioned group of stars.</p><p>After leading further examination, Sahaj distinguished these lights as Starlink satellites, a formation of SpaceX, a noticeable aviation fabricating undertaking possessed by Elon Musk. The essential goal of these satellites, known as Starlink, is to work with broadband web openness through a variety of low circle satellites. As SpaceX proceeds with its undertaking to send extra satellites, the recurrence of such light sightings is supposed to increment.</p><p>John Hart, the overseer of the James A. Smith Planetarium arranged in Chickamauga, Georgia, clarified that the noticed lights are as a matter of fact a consequence of daylight bouncing off the surfaces of the circling satellites. He noticed that spotting passing satellites is a standard event and can be seen on most nights while wandering outside.</p><p>In the city of Atlanta, devotees of space science and sky perception had the honor of seeing a noteworthy parade of sparkling satellites on Monday night. By and by, the brightness of this exhibition surprised a few people. Reports were gotten concerning this nighttime peculiarity, which harmonized with a locating of the Global Space Station. The night’s perception of the ISS flyover was essential for a double exhibition close by the Starlink satellite cluster. This double showcase initiated only preceding 10 p.m. what’s more, as an additional joy, was unfurling against the background of an almost full moon. The ensuing day was set to welcome a supermoon, a peculiarity wherein the moon seems bigger than expected because of its nearness to Earth in its orbital way.</p><p>Albeit the send off of Starlink satellites is a typical event, seeing a motorcade of these satellites, which are equipped for radiating web signals, can end up being a test. The accompanying data gives bits of knowledge into Starlink and the unmistakable idea of the noticed occasion.</p><p>Starlink satellites are the brainchild of SpaceX, a spearheading private spaceflight organization under the initiative of Elon Musk. SpaceX has embraced the mission of laying out an organization of satellites determined to stretch out worldwide web inclusion to even the most remote and underserved regions. Under states of clear skies and negligible light contamination, people might have the valuable chance to witness these satellites in circle. The individuals who witness these satellites resulting to their organization frequently depict them as a moving series of lights. This iridescent development stays noticeable for a restricted period following their send off. After accomplishing their functional elevation of approximately 340 miles, the Starlink satellites scatter and can look like stars in the night sky.</p><p>SpaceX’s Starlink drive addresses a deliberate work to offer overall web network, especially in locales that face difficulties in such manner. The send off of Starlink web access happened roughly a year prior, with plans for additional development of administration inside Georgia this year. Remarkably, SpaceX presently gives network access across a significant part of the country, except for explicit southeastern regions. The organization has laid down a good foundation for itself as a dependable internet service in different nations, including Nigeria, Peru, and Kenya.</p><p>The night sky over Chattanooga and North Georgia was illuminated by a mesmerizing procession of bright lights moving in a straight line, leaving residents surprised and captivated. Individuals observed these lights, initially mistaking them for stars in Orion’s Belt, only to realize they were actually Starlink satellites, part of SpaceX’s initiative to provide global internet coverage. These satellites, reflecting sunlight as they orbit, created a striking visual display. The event coincided with the International Space Station flyover and the imminent arrival of a supermoon. The occurrence of both the Starlink parade and the supermoon added to the celestial spectacle.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7aa99b12356e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Title: Top 5 DSA Coding Tricks]]></title>
            <link>https://medium.com/@priyagupta7272/title-top-5-dsa-coding-tricks-88b68f70b46c?source=rss-51c3f5e57903------2</link>
            <guid isPermaLink="false">https://medium.com/p/88b68f70b46c</guid>
            <category><![CDATA[top-10]]></category>
            <category><![CDATA[dsa-courses]]></category>
            <category><![CDATA[datastrucutre]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[trends]]></category>
            <dc:creator><![CDATA[Priya Gupta]]></dc:creator>
            <pubDate>Tue, 01 Aug 2023 13:15:51 GMT</pubDate>
            <atom:updated>2023-08-01T13:21:19.567Z</atom:updated>
            <content:encoded><![CDATA[<h3>Top 5 DSA Coding Tricks</h3><p>When facing interview questions, it is crucial to break them down into smaller components to gain a complete understanding of the problem. Focusing on the input and output of the problem will aid in devising effective solutions. To ensure optimized code in terms of time complexity, utilize various data structures such as stack, queue, list, hashmap, and tree. Additionally, explore and leverage built-in functions of these data structures, such as addAll(), addElement(), capacity(), clear(), clone(), contains(), containsAll(), copyInto(), elementAt(), and ensureCapacity(int minCapacity), among others. This article highlights the top five DSA coding tricks that can significantly enhance your problem-solving skills.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*O9uFwzXkSKOXQszlqWO-xw.png" /></figure><p>1. Divide and Conquer: Breaking Down the Problem<br>When encountering an interview question, adopt a divide and conquer approach. Analyze the problem carefully, identify its key components, and break it down into smaller sub-problems. By understanding each sub-problem individually, you can devise a well-structured and efficient solution for the entire problem.</p><p>2. Optimize Time Complexity with Data Structures<br>Efficient algorithms are crucial for solving complex problems. To optimize the time complexity of your code, utilize data structures like stack, queue, list, hashmap, and tree. These data structures offer specific operations with varying time complexities, enabling you to choose the most suitable one for your problem.</p><p>3. Explore Built-in Functions of Data Structures<br>Data structures in programming languages often come with built-in functions that can simplify and expedite your coding process. Familiarize yourself with these functions and leverage them to improve the efficiency and readability of your code. Some common built-in functions include addAll(), addElement(), capacity(), clear(), clone(), contains(), containsAll(), copyInto(), elementAt(), and ensureCapacity(int minCapacity).</p><p>4. Utilize Carryforward in Iterations<br>In certain scenarios, you may encounter situations where data from previous iterations is required in subsequent iterations. In such cases, employ the carryforward technique to preserve and use the data from previous iterations. This approach can lead to more concise and effective solutions.</p><p>5. Employ Prefix Sum for Accumulating Data<br>Prefix sum is a valuable technique for efficiently calculating cumulative sums in an array. When you need to add up elements repeatedly or perform range-based queries, prefix sum can significantly enhance performance. By precomputing the cumulative sum of elements, you can achieve constant-time complexity for subsequent queries.</p><p>6. Harness the Power of HashMap for Fast Data Retrieval<br>When searching for data in a collection, HashMap is a powerful data structure that can provide constant-time complexity for average-case scenarios. By mapping unique keys to their corresponding values, HashMap allows you to quickly retrieve data without resorting to time-consuming linear searches.</p><p>Conclusion:<br>Mastering these top five DSA coding tricks will undoubtedly improve your problem-solving skills and make you a more efficient coder. Breaking down problems, optimizing time complexity with appropriate data structures, utilizing built-in functions, applying carryforward with data, leveraging prefix sum, and employing HashMap for efficient data retrieval are all essential techniques that can elevate your programming capabilities and excel in coding interviews.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88b68f70b46c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Structures and Algorithms “Queue”]]></title>
            <link>https://medium.com/@priyagupta7272/data-structures-and-algorithms-queue-d1e5b2bdf9d9?source=rss-51c3f5e57903------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1e5b2bdf9d9</guid>
            <category><![CDATA[dequeue]]></category>
            <category><![CDATA[arraydeque]]></category>
            <category><![CDATA[crud]]></category>
            <category><![CDATA[datastrucutre]]></category>
            <category><![CDATA[queue]]></category>
            <dc:creator><![CDATA[Priya Gupta]]></dc:creator>
            <pubDate>Sat, 29 Jul 2023 08:01:08 GMT</pubDate>
            <atom:updated>2023-07-29T08:21:04.224Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://leetcode.com/tag/queue/">Leet code queue problems link</a></p><p><strong>What is a queue?</strong></p><p>A queue is a <strong>linear data structure</strong> that is used to insert (<strong>push</strong>) data from one <strong>end</strong> and delete (<strong>pop</strong>) data from the <strong>front</strong>.</p><p>A queue is an <strong>interface</strong>. An interface defines a <strong>contract that classes can implement</strong>, specifying a set of methods that must be present in any class to implement that interface. with the help of the interface, <strong>different classes provide their own methods defined in the interface.</strong></p><p><strong>Nature of queue</strong>- <strong>FIFO</strong> (first in First out)/<strong>LILO</strong>(last in last out).</p><p><strong>How to declare a queue?</strong></p><p>Queue&lt;Integer&gt; que=new ArrayDeque&lt;&gt;();</p><p>Queue&lt;Integer&gt; que=new LinkList&lt;&gt;();</p><p>Queue&lt;Obj&gt; queue = new PriorityQueue&lt;Obj&gt; ();</p><p><strong>Note</strong>:</p><ol><li>To implement the queue we use <strong>ArrayDeque &amp; LinkedList </strong>as the queue is<strong> not a class</strong> it’s an interface.</li><li>We can’t create an object/instance for the interface.</li></ol><p><strong>What all different functions are available in the queue data structure?</strong></p><ol><li>Baggage scanner.</li></ol><p>2. Escalator stairs</p><p>3. Petrol pump.</p><p>4. Printing of paper.</p><p>5. Emergency queue.</p><p>6. Ticketing system.</p><p>7. Task allocation</p><p>8. Traffic management</p><p>9. Customer service.</p><p>10. Web servers</p><p>Methods in the Queue interface as mention below:</p><ol><li>add(element): Add an element to the back of the queue.</li><li>remove(): Remove and return the front element of the queue.</li><li>peek(): Return the front element of the queue without removing it.</li><li>isEmpty(): Check if the queue is empty.</li><li>size(): Get the number of elements in the queue.</li><li><strong>Code to add value (ex. 10)in the queue:</strong></li></ol><p><strong>code</strong>:</p><p>Queue&lt;Integer&gt; que=new ArrayDeque&lt;&gt;();</p><p>que.add(10);</p><p>System. out.print(que);</p><p><strong>Output: [10]</strong></p><p><strong>2. Code to add multiple values in the queue:</strong></p><p><strong>code</strong>:</p><p>Queue&lt;Integer&gt; que=new ArrayDeque&lt;&gt;();</p><p>que.add(10);</p><p>que.add(20);</p><p>que.add(30);</p><p>que.add(40);</p><p>System.out.print(que);</p><p><strong>Output: [10,20,30,40]</strong></p><p><strong>3. Code to delete the value in the queue:</strong></p><p>Queue&lt;Integer&gt; que=new ArrayDeque&lt;&gt;();</p><p>que.add(10);</p><p>que.add(20);</p><p>que.add(30);</p><p>que.add(40);</p><p>que.remove(10);</p><p>System.out.print(que);</p><p><strong>Output: [20,30,40]</strong></p><p><strong>4. Code to get the peek (Front) value in the queue:</strong></p><p>Queue&lt;Integer&gt; que=new ArrayDeque&lt;&gt;();</p><p>que.add(10);</p><p>que.add(20);</p><p>que.add(30);</p><p>que.add(40);</p><p>que.remove();</p><p>int val=que.peek();</p><p>System.out.print(val);</p><p><strong>Output</strong>: 20</p><p><strong>5. Code to get the size of the queue:</strong></p><p>Queue&lt;Integer&gt; que=new ArrayDeque&lt;&gt;();</p><p>que.add(10);</p><p>que.add(20);</p><p>que.add(30);</p><p>que.add(40);</p><p>que.remove();</p><p>int size = que.size();</p><p>System.out.print(size);</p><p><strong>Output</strong>: 3</p><p><a href="https://leetcode.com/tag/queue/">Leet code queue problems link</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1e5b2bdf9d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Structure & Algorithms — Stack]]></title>
            <link>https://medium.com/@priyagupta7272/data-structure-algorithms-stack-21ef13258681?source=rss-51c3f5e57903------2</link>
            <guid isPermaLink="false">https://medium.com/p/21ef13258681</guid>
            <category><![CDATA[stack-application]]></category>
            <category><![CDATA[stack]]></category>
            <category><![CDATA[dsa-training]]></category>
            <category><![CDATA[stackoverflow]]></category>
            <category><![CDATA[dsa-convention]]></category>
            <dc:creator><![CDATA[Priya Gupta]]></dc:creator>
            <pubDate>Sun, 16 Jul 2023 20:44:51 GMT</pubDate>
            <atom:updated>2023-07-18T21:31:35.253Z</atom:updated>
            <content:encoded><![CDATA[<h3>Data Structure &amp; Algorithms — Stack</h3><p><a href="https://leetcode.com/tag/stack/">Leet code standard stack question link</a></p><p>What is a stack?</p><p>A stack is a linear data structure that is used to insert (push) and delete (pop) the data from the same end.</p><p>Nature of stack- LIFO (last in first out)</p><p><strong>What all different functions are available in the stack data structure?</strong></p><ol><li>push(): The push function is used to insert the elements to the top of the stack.</li><li>pop(): The pop function is used to delete the elements from the top of the stack.</li><li>peek(): The peek function returns the top item from the stack.</li><li>size(): The size function returns the size of the stack.</li></ol><p><strong>List the 10 real-world applications of stack DSA.</strong></p><p>1. Wearing and removing Bangles.</p><p>2. Converting infix to postfix expressions</p><p>3. Undo/Redo operations in word processors.</p><p>4. Forward-backward surfing in the browser.</p><p>5. Message logs in the mobile device.</p><p>6. History of Browser.</p><p>7. E-mails in the email box.</p><p>8. History of call in Call logs.</p><p>9. Photo/video in the gallery.</p><p>10. Downloaded videos in the youtube download section.</p><p><strong>List down all the Problems generally ask in an interview on the stack:</strong></p><p>During a technical interview for a software development position, some common problems that may be asked related to stacks include:</p><p><a href="https://leetcode.com/tag/stack/">Leet code standard stack question link</a></p><p>1. Implementing a stack using an array or linked list.<br>2. Reversing a string using a stack.<br>3. Checking if parentheses in an expression are balanced using a stack.<br>4. Evaluating a postfix expression using a stack.<br>5. Implementing a function to find the minimum element in a stack in constant time.<br>6. Converting an infix expression to a postfix expression using a stack.<br>7. Implementing a stack that supports finding the maximum element in constant time.<br>8. Designing a stack with an additional function to get the minimum element in constant time.</p><p>These problems are often used to assess a candidate’s understanding of data structures, algorithmic thinking, and ability to apply stack-related operations effectively.</p><p><strong>Listing down all the error messages available while implementing the stack</strong></p><ol><li>Overflow Error: This error message is displayed when attempting to push an element onto a stack that has reached its maximum capacity. It indicates that the stack is full and cannot accommodate additional elements.</li><li>Underflow Error: This error message occurs when attempting to pop an element from an empty stack. It indicates that there are no elements in the stack to be removed.</li><li>Empty Stack Error: This error message is shown when attempting to perform operations like peeking or popping on an empty stack. It indicates that the stack does not contain any elements to perform the specified operation.</li><li>Invalid Index Error: This error message is used when accessing elements within the stack using an invalid index. It indicates that the provided index is out of bounds, meaning it is either negative or exceeds the valid range of indices.</li><li>Capacity Error: This error message is displayed when attempting to create a stack with an invalid or non-usable capacity. It indicates that the specified capacity is not valid, such as a negative value or zero.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21ef13258681" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Java Language Is Still in High Demand]]></title>
            <link>https://medium.com/@priyagupta7272/why-java-language-is-still-in-high-demand-549ad49155bd?source=rss-51c3f5e57903------2</link>
            <guid isPermaLink="false">https://medium.com/p/549ad49155bd</guid>
            <category><![CDATA[top-technology-trends]]></category>
            <category><![CDATA[technology-news-articles]]></category>
            <category><![CDATA[highlights]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Priya Gupta]]></dc:creator>
            <pubDate>Sun, 16 Jul 2023 18:34:22 GMT</pubDate>
            <atom:updated>2023-07-16T18:34:22.406Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*RLkAEVxxv42SWul8cI2W4A.png" /></figure><p>Java, known for its simplicity, ease of use, and platform independence, continues to be a highly demanded programming language, despite the availability of other languages like Node.js, JavaScript, Kotlin, and Python, which are considered faster and more user-friendly. So, what makes Java remain the preferred choice in over 80% of programs worldwide? Let’s explore the reasons behind Java’s ongoing demand and priority.</p><p>While the market offers several programming languages, Java stands out for several compelling reasons. Here’s a comparison highlighting Java’s strengths that contribute to its continued popularity and preference:</p><p>1. Strong Enterprise Adoption: Java has a longstanding history of being used in enterprise-level applications and systems. Many large-scale organizations and industries heavily rely on Java for their critical business applications, making it a trusted choice for building robust, scalable, and secure solutions.</p><p>2. Android Development: Java is the primary language used for Android app development. With Android being the dominant mobile operating system globally, the demand for Java skills remains significant, as developers need to leverage Java to create native Android applications.</p><p>3. Mature Ecosystem: Java has a vast and mature ecosystem with extensive libraries, frameworks, and tools that support various development needs. This ecosystem provides developers with a wide range of resources, documentation, and community support, making it easier to build complex applications efficiently.</p><p>4. Stability and Compatibility: Java is known for its stability and backward compatibility. This means that code written in older versions of Java can still run on newer versions without major modifications. This backward compatibility makes Java a reliable choice for organizations that have long-term software projects and need to maintain legacy codebases.</p><p>5. Strong Performance: Java’s performance has continuously improved over the years. The Java Virtual Machine (JVM) includes features like Just-In-Time (JIT) compilation and runtime optimization, which contribute to its efficient execution and ability to handle high-performance workloads.</p><p>6. Security: Java has built-in security features that make it a preferred choice for applications where security is a top priority. The Java language and runtime environment include features like bytecode verification, sandboxing, and controlled memory access, which help mitigate security vulnerabilities.</p><p>7. Job Market and Career Opportunities: Java’s widespread adoption and demand across various industries result in a robust job market for Java developers. The availability of job opportunities, competitive salaries, and career growth potential make Java an attractive choice for developers seeking long-term stability and career advancement.</p><p>It’s important to note that the choice of programming language depends on various factors, such as the specific use case, project requirements, developer preferences, and ecosystem availability. While other languages may have their strengths and niches, Java’s combination of features, industry support, and maturity contribute to its enduring demand and priority in many development scenarios.</p><p>Is Java More Secure than Others?</p><p>The security of a programming language is not solely determined by the language itself but also by how it is used, the implementation, and the surrounding ecosystem. While no programming language can be considered inherently “more secure” than others, some languages provide certain features or best practices that can help developers write more secure code.</p><p>Java, Kotlin, Python, and Scala are all popular programming languages, each with its own strengths and weaknesses. Each language has its own security considerations and associated best practices. Here’s a brief overview:</p><p>1. Java: Java has a strong focus on security, with features like bytecode verification, memory management, and a robust security model. It enforces strict access control mechanisms and provides built-in support for encryption and authentication. Java’s extensive ecosystem also offers security libraries and frameworks to address common security challenges.</p><p>2. Kotlin: Kotlin is designed to be fully interoperable with Java, so it inherits many of Java’s security features and benefits. Kotlin code runs on the Java Virtual Machine (JVM) and can leverage the same security mechanisms as Java.</p><p>3. Python: Python is a dynamic and versatile language widely used for various purposes, including web development and scripting. While Python itself doesn’t have built-in security features like Java, it provides libraries and frameworks to handle security concerns, such as cryptography and authentication. However, due to its dynamic nature, Python code can be more susceptible to certain types of security vulnerabilities if not carefully managed.</p><p>4. Scala: Scala is a statically typed language that runs on the JVM, similar to Java and Kotlin. It shares many of Java’s security features and benefits, leveraging the JVM’s security mechanisms. Scala’s functional programming capabilities can also contribute to writing secure code by promoting immutability and reducing the risk of certain vulnerabilities.</p><p>Ultimately, the security of an application depends on various factors, including the expertise of the developers, adherence to security best practices, proper configuration, secure coding practices, and timely updates. Choosing the right language is just one aspect of building a secure system.</p><p>Does Java Have Limitations Besides the Diamond Problem?</p><p>Java, like any programming language, has its own set of limitations and strengths. While it is true that Java does not suffer from the diamond problem (a specific issue with multiple inheritance), it still has other limitations and trade-offs when compared to other languages like Kotlin, Python, and Scala. Here are some considerations:</p><p>1. Verbosity: Java is known for its verbosity, which means that it requires more code compared to languages like Kotlin and Python to achieve the same functionality. This can make Java code more complex and harder to read.</p><p>2. Null Safety: Java does not have built-in null safety mechanisms, which means that null references can cause NullPointerExceptions at runtime. Languages like Kotlin have features that help mitigate this issue, providing better null safety.</p><p>3. Functional Programming: While Java has added some functional programming features in recent versions, it is not as naturally suited for functional programming as languages like Kotlin and Scala, which have more advanced functional programming capabilities.</p><p>4. Concurrency: Java has built-in support for multithreading and concurrency through the Java Concurrency API, but it can be complex to work with compared to more modern concurrency frameworks available in Kotlin and Scala.</p><p>5. Interoperability: Java has excellent interoperability with other languages and platforms due to its wide adoption and mature ecosystem. However, some newer languages like Kotlin have been designed with interoperability in mind and offer seamless integration with Java code.</p><p>6. Development Experience: Languages like Kotlin and Scala often provide more concise and expressive syntax, reducing boilerplate code and making the development experience more pleasant. Additionally, Kotlin and Python, in particular, have features that promote a more expressive and concise coding style.</p><p>It’s important to note that each language has its own strengths and weaknesses, and the choice of language depends on the specific requirements of a project and personal preferences. While Java has certain limitations, it remains a popular and widely used language in many domains due to its performance, stability, and extensive libraries.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=549ad49155bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advancements in Chandrayaan-3: Pioneering Features for Lunar Exploration — 14 July 2023 ( IST —…]]></title>
            <link>https://medium.com/@priyagupta7272/advancements-in-chandrayaan-3-pioneering-features-for-lunar-exploration-14-july-2023-ist-ed4eea8517c8?source=rss-51c3f5e57903------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed4eea8517c8</guid>
            <dc:creator><![CDATA[Priya Gupta]]></dc:creator>
            <pubDate>Fri, 14 Jul 2023 19:04:31 GMT</pubDate>
            <atom:updated>2023-07-14T19:04:31.348Z</atom:updated>
            <content:encoded><![CDATA[<h3>Advancements in Chandrayaan-3: Pioneering Features for Lunar Exploration — 14 July 2023 ( IST — 2:35 pm)</h3><p>Chandrayaan-3, the second Moon mission of the Indian Space Research Organisation (ISRO), was launched on July 14 at 2.35 pm from the east coast of Andhra Pradesh. This date coincided with the Hindu calendar’s Dwadashi, which signifies the twelfth day of the lunar cycle, falling on Friday, July 14, 2023. The launch of Chandrayaan-3 holds immense significance for the Indian populace, as they eagerly anticipate the mission’s outcomes. Serving as the successor to Chandrayaan-2, this mission marks ISRO’s third endeavor to explore the Moon’s surface. The primary objective of this mission is to showcase the capability of soft-landing and operating a robotic rover on the lunar terrain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/0*T2wcaJRXWkLPsU7-" /></figure><p>Chandrayaan-3 has now successfully embarked on its journey from the Satish Dhawan Space Centre in Sriharikota, Andhra Pradesh, on Friday at 2.35 pm. It is estimated to take over a month for Chandrayaan-3 to reach and touch down on the lunar surface. In the event of a successful landing, India will celebrate not only its triumph but also the exploration of a potentially inhabited environment beyond Earth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/0*i_dkEoi0AYGtcUMv" /></figure><p>The primary focus of this mission is to achieve a soft landing on the lunar surface and conduct an extensive exploration with the aid of a rover. A successful soft landing will establish India as the fourth country, following the United States, Russia, and China, to accomplish this feat of lunar exploration. Following its launch into an orbit around the Earth, positioned at an altitude of 179 km, the spacecraft will progressively increase its orbit through a series of maneuvers to break free from Earth’s gravitational pull and propel towards the Moon. Upon nearing the Moon, the spacecraft will need to be captured by its gravitational force. Once captured, the lander, housing the rover within it, will separate from the propulsion module and commence its powered descent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/0*-nmEOElYEgTQ5f5h" /></figure><p><strong>“Ritu Karidhal Shrivastava: The Visionary Leader of Chandrayaan-3”.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/0*gY8ka46eXYuNjxC3" /></figure><p><strong>Why Chandrayaan-3 is special?</strong></p><p>Chandrayaan-3, the upcoming Moon mission by the Indian Space Research Organisation (ISRO), incorporates several new features and improvements based on lessons learned from previous missions. Some of the notable features of Chandrayaan-3 are:</p><p>1. Enhanced Lander and Rover Design: Chandrayaan-3 will feature an upgraded lander and rover design, addressing the technical issues encountered during Chandrayaan-2’s landing phase. The lander and rover systems have undergone improvements in their guidance, navigation, and control systems to ensure more precise and accurate descent and landing.</p><p>2. Advanced Communication Systems: Chandrayaan-3 will be equipped with enhanced communication systems, enabling better and more reliable data transmission between the spacecraft and ground control. This will facilitate improved real-time monitoring and control of the mission, ensuring efficient communication throughout the lunar exploration phase.</p><p>3. Robust Navigation and Soft-Landing Capabilities: Chandrayaan-3 aims to demonstrate advanced navigation and soft-landing capabilities on the lunar surface. The mission will employ sophisticated navigation algorithms and sensors to precisely guide the lander during descent, ensuring a gentle and controlled touchdown.</p><p>4. Extended Mission Duration: Chandrayaan-3 is expected to have a longer operational lifespan compared to its predecessors. This extended mission duration will allow for a more comprehensive exploration of the lunar surface, enabling the rover to gather a greater volume of scientific data and insights.</p><p>5. Upgraded Scientific Payload: The mission will carry an upgraded scientific payload, comprising a suite of advanced instruments and sensors. These instruments will enable detailed studies of the Moon’s surface, composition, mineralogy, and other scientific parameters. The enhanced payload will contribute to a deeper understanding of the lunar environment and its evolution.</p><p>6. International Collaborations: Chandrayaan-3 is expected to foster international collaborations, with participation from other space agencies and research institutions. Collaborative efforts will bring together expertise and resources from various countries, enriching the mission with diverse perspectives and expanding the scope of scientific investigations.</p><p><strong>Failure of Chandrayaan-1 and Chandrayaan-2</strong></p><p>Chandrayaan-1 and Chandrayaan-2 faced certain challenges and encountered failures during their missions. Here are some additional points explaining the reasons behind their failures:</p><p>1. Chandrayaan-1: The mission was primarily successful in achieving its scientific objectives, but it faced a premature termination. The spacecraft lost contact with ground stations on August 29, 2009, just a year after its launch. The main reason for the failure was a power system failure on board the spacecraft. This failure resulted in the depletion of the battery and subsequent termination of the mission.</p><p>2. Chandrayaan-2: The mission, comprising an orbiter, lander, and rover, encountered a setback during the landing phase. The lander, named Vikram, deviated from its intended path during the final descent to the lunar surface. The precise cause of the deviation was later identified as a software glitch in the lander’s guidance and navigation system. This anomaly caused the lander to lose communication with ground control, leading to a hard landing and the inability to deploy the rover.</p><p>These failures served as learning experiences for ISRO, providing valuable insights and opportunities for improvement in subsequent missions. The challenges faced by Chandrayaan-1 and Chandrayaan-2 contributed to the meticulous planning and rigorous testing of Chandrayaan-3, aimed at overcoming past shortcomings and achieving a successful soft landing and rover exploration on the Moon’s surface.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed4eea8517c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>