<?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 Priyansh S. on Medium]]></title>
        <description><![CDATA[Stories by Priyansh S. on Medium]]></description>
        <link>https://medium.com/@psangule?source=rss-f969e4650cd8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Priyansh S. on Medium</title>
            <link>https://medium.com/@psangule?source=rss-f969e4650cd8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 10:57:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@psangule/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[Enhancing Customer Experience in Retail Banking]]></title>
            <link>https://medium.com/@psangule/enhancing-customer-experience-in-retail-banking-d037280c4d78?source=rss-f969e4650cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d037280c4d78</guid>
            <dc:creator><![CDATA[Priyansh S.]]></dc:creator>
            <pubDate>Fri, 24 Jan 2025 16:01:53 GMT</pubDate>
            <atom:updated>2025-01-24T16:01:53.084Z</atom:updated>
            <content:encoded><![CDATA[<p>Providing an outstanding customer experience (CX) is now necessary in the highly competitive retail banking market. Banks must change their tactics to satisfy consumers’ growing need for streamlined, customized services. In order to help financial institutions both maintain and attract new clients, this article examines important strategies for improving the customer experience in retail banking.</p><h3>The Importance of Customer Experience in Banking</h3><p>In banking, the term “customer experience” refers to all of a customer’s interactions with their financial institution, including account opening, loan applications, and investment management. A positive CX can lead to:</p><ul><li><strong>Increased Customer Loyalty</strong>: Satisfied customers are more likely to remain loyal and recommend the bank to others.</li><li><strong>Higher Revenue</strong>: Enhanced experiences can lead to increased cross-selling opportunities and higher transaction volumes.</li><li><strong>Competitive Advantage</strong>: In a saturated market, superior customer experience can differentiate a bank from its competitors.</li></ul><h3>Key Strategies for Enhancing Customer Experience</h3><h3>1. Embrace Digital Transformation</h3><p>The shift towards digital banking is transforming how customers interact with financial institutions. Banks must invest in:</p><ul><li><strong>User-Friendly Mobile Apps</strong>: A well-designed mobile app allows customers to access services anytime, anywhere, enhancing convenience and satisfaction.</li><li><strong>Chatbots and AI</strong>: AI-driven chatbots can provide instant responses to customer inquiries, reducing wait times and improving service efficiency.</li></ul><h3>2. Personalization of Services</h3><p>Personalized experiences resonate more with customers. Banks can leverage data analytics to tailor services by:</p><ul><li><strong>Segmented Marketing Campaigns</strong>: Targeted promotions based on customer preferences can significantly enhance engagement.</li><li><strong>Proactive Communication</strong>: Regular outreach with relevant information shows customers that the bank understands their needs.</li></ul><h3>3. Streamline In-Branch Experiences</h3><p>While digital solutions are vital, many customers still value in-person interactions. Improving in-branch experiences can include:</p><ul><li><strong>Efficient Service Delivery</strong>: Reducing wait times and ensuring staff are well-trained in customer service can enhance satisfaction.</li><li><strong>Integration of Digital Tools</strong>: Allowing customers to start transactions online and complete them in-person merges the benefits of both worlds.</li></ul><h3>4. Provide Self-Service Options</h3><p>Modern consumers prefer having control over their banking needs. Banks should offer:</p><ul><li><strong>Self-Service Portals</strong>: Empowering customers to manage their accounts online fosters independence and satisfaction.</li><li><strong>Knowledge Bases</strong>: Providing comprehensive FAQs and guides helps customers navigate services without needing direct assistance.</li><li><strong>Omni-Channel Experience</strong>: Giving similar experience across channels and the ability to start off the process from any channel helps make the process less intrusive for the user.</li></ul><h3>Continuous Feedback and Improvement</h3><p>To truly enhance customer experience, banks must prioritize feedback collection:</p><ul><li><strong>Regular Surveys</strong>: Gathering insights through surveys helps identify areas for improvement.</li><li><strong>Acting on Feedback</strong>: Implementing changes based on customer suggestions shows that the bank values their opinions.</li></ul><h3>Conclusion: The Path Forward</h3><p>Enhancing customer experience in retail banking is an ongoing journey that requires commitment and adaptability. By embracing digital transformation, personalizing services, streamlining processes, and fostering feedback, banks can create a superior experience that meets the evolving needs of their customers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d037280c4d78" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Navigating Cybersecurity Risks in the Digital Banking Era]]></title>
            <link>https://medium.com/@psangule/navigating-cybersecurity-risks-in-the-digital-banking-era-123fbf7bdd43?source=rss-f969e4650cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/123fbf7bdd43</guid>
            <dc:creator><![CDATA[Priyansh S.]]></dc:creator>
            <pubDate>Fri, 24 Jan 2025 15:56:25 GMT</pubDate>
            <atom:updated>2025-01-24T15:56:25.465Z</atom:updated>
            <content:encoded><![CDATA[<p>Cybersecurity has emerged as an important concern as the banking industry embraces digital transformation more and more. Financial institutions must actively manage these risks in light of the increasing complexity of cyberthreats in order to protect their business operations and clientele. In the age of digital banking, this essay examines the main cybersecurity issues and provides doable solutions to improve security.</p><h3>The Evolving Cyber Threat Landscape</h3><p>The financial services industry is a prime target for cybercriminals due to its vast amounts of sensitive data and significant financial assets. Key threats include:</p><ul><li>Phishing Attacks: Cybercriminals employ advanced phishing techniques to deceive employees and customers into revealing sensitive information, leading to unauthorized access and identity theft. <a href="https://cybelangel.com/banking-cybercrime-2025/">2</a></li><li>Ransomware: This malicious software encrypts critical financial data, demanding ransom for its release. The trend is shifting towards more targeted attacks on high-profile organizations, making ransomware a top concern for banks. <a href="https://www.firstbank.com/resources/learning-center/cybersecurity-in-2025-what-financial-institutions-need-to-know/">1</a> <a href="https://www.upguard.com/blog/biggest-cyber-threats-for-financial-services">5</a></li><li>Distributed Denial of Service (DDoS): DDoS attacks overwhelm banking servers with traffic, disrupting online services and harming customer experience. <a href="https://www.upguard.com/blog/biggest-cyber-threats-for-financial-services">5</a></li></ul><h3>Strategies for Mitigating Cybersecurity Risks</h3><p>To effectively combat these threats, financial institutions can implement several key strategies:</p><h3>1. Invest in Advanced Security Technologies</h3><p>Utilizing AI-powered security tools can help detect and respond to cyber threats in real-time. These technologies can identify unusual patterns indicative of potential breaches and automate responses to mitigate risks. <a href="https://www.firstbank.com/resources/learning-center/cybersecurity-in-2025-what-financial-institutions-need-to-know/">1</a></p><h3>2. Strengthen Employee Training Programs</h3><p>Human error remains a significant vulnerability in cybersecurity. Regular training sessions on recognizing phishing attempts, secure password practices, and safe internet usage can empower employees to act as the first line of defense against cyber threats. <a href="https://media.dashdevs.com/images/top-cybersecurity-threats.png?sa=X&amp;ved=2ahUKEwiW7s3H2Y6LAxUZLdAFHVk_JJgQ_B16BAgJEAI">6</a></p><h3>3. Develop a Comprehensive Incident Response Plan</h3><p>Having a well-defined incident response plan is crucial for minimizing damage during a cyberattack. This plan should outline roles, responsibilities, and procedures for containment, eradication, and recovery from incidents such as ransomware attacks. <a href="https://www.firstbank.com/resources/learning-center/cybersecurity-in-2025-what-financial-institutions-need-to-know/">1</a> <a href="https://cloud.google.com/blog/topics/threat-intelligence/cybersecurity-forecast-2025?e=48754805">4</a></p><h3>4. Enhance Data Protection Measures</h3><p>Implementing robust encryption protocols for sensitive data both at rest and in transit is essential. Additionally, regular audits of data access permissions can help ensure that only authorized personnel have access to critical information. <a href="https://www.firstbank.com/resources/learning-center/cybersecurity-in-2025-what-financial-institutions-need-to-know/">1</a> <a href="https://reports.weforum.org/docs/WEF_Global_Cybersecurity_Outlook_2025.pdf">3</a></p><h3>5. Collaborate with Cybersecurity Experts</h3><p>Engaging with cybersecurity firms or adopting “Cybersecurity as a Service” (CaaS) models can provide financial institutions with specialized expertise and resources that may not be available in-house. This collaboration can enhance threat detection capabilities and incident response strategies. <a href="https://www.firstbank.com/resources/learning-center/cybersecurity-in-2025-what-financial-institutions-need-to-know/">1</a> <a href="https://cloud.google.com/blog/topics/threat-intelligence/cybersecurity-forecast-2025?e=48754805">4</a></p><h3>Conclusion: Prioritizing Cybersecurity in Digital Banking</h3><p>As we advance further into the digital age, the importance of cybersecurity in banking cannot be overstated. By understanding the evolving threat landscape and implementing proactive measures, financial institutions can protect their assets and maintain customer trust.</p><p>By following these guidelines and remaining vigilant against cyber threats, banks can not only protect themselves but also enhance their reputation as secure financial service providers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=123fbf7bdd43" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Post Quantum Cryptography in BFSI Sector]]></title>
            <link>https://medium.com/@psangule/post-quantum-cryptography-in-bfsi-sector-a18e0fad8e84?source=rss-f969e4650cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/a18e0fad8e84</guid>
            <category><![CDATA[bfsi]]></category>
            <category><![CDATA[post-quantum-cryptography]]></category>
            <category><![CDATA[banking]]></category>
            <dc:creator><![CDATA[Priyansh S.]]></dc:creator>
            <pubDate>Mon, 22 Apr 2024 15:07:12 GMT</pubDate>
            <atom:updated>2024-04-23T01:59:51.569Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mrYyV_tu8pf5o0gq" /><figcaption>Photo by <a href="https://unsplash.com/@jdent?utm_source=medium&amp;utm_medium=referral">Jason Dent</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>With the imminent onset of the quantum age, the BFSI Industry will be majorly impacted by quantum computing. It is expected to push the computational boundaries for financial modelling, analysis and better decision-making systems. However, from a data security point of view, the current BFSI Industry faces severe threats.</p><p>Applications on the internet today are protected by classical public-key cryptography algorithms like RSA, ECC, or DSA which rely on the fact that it would take powerful traditional computers hundreds of years to crack them. With the advent of quantum computing, it is expected that they could break these algorithms with ease — posing a threat to the status quo data security standards of the industry.</p><p>Postquantum cryptography (PQC), also called quantum-safe, quantum-proof, or quantum-resistant cryptography are algorithms designed to secure against both classical and quantum-computing attacks.</p><p>Even though quantum computers seem to be in the distant future, the risk is not a future concern but a present one. “Steal now decrypt later” (SNDL) is a current-day challenge that involves hackers harvesting encrypted data today and decrypting them later using quantum computers. Hence, pushing the industry towards safeguarding their trust and integrity for the future and adopting quantum-safe measures.</p><h3>Business Impact</h3><p>As the computational power of computers improve, common cryptographic functions such will eventually become unsafe. Quantum resistant algorithms offers organizations a higher level of cryptographic protection — keeping them safe from quantum computers as they become more mainstream.</p><h3>Drivers for change</h3><p>The following are the leading reasons for bringing in change in the industry:</p><ol><li><strong>Deprecating security of status quo systems.</strong><br>Quantum computers pose a threat to the inherent vulnerabilities of traditional cryptographic algorithms due to their underlying mathematical principles. Many of the encryption techniques used today are based on discrete logarithms and integer factorization, two mathematical problems that quantum computers may be able to handle quickly. The security of these status quo cryptographic systems decreases with the capability of quantum computers, hence post-quantum cryptography (PQC) must be used in order to maintain security.</li><li><strong>Devising PQC strategies within the upcoming legal frameworks for PQC.<br></strong>The legal and regulatory frameworks governing the use of post-quantum cryptography solutions must be taken into account by businesses in the BFSI industry as they progress towards adopting these solutions. It is anticipated that new laws and regulations concerning the use and implementation of post-quantum cryptographic algorithms will be introduced by governments and regulatory bodies as they become more aware of how critical it is to be prepared for the post-quantum era. BFSI establishments must formulate plans that tackle the technical elements of shifting to PQC and guarantee adherence to these upcoming regulatory structures. In order to keep up with regulatory changes and make sure that their PQC strategies comply with legal requirements, this might require collaborating with legislators, legal professionals, and trade associations.</li><li><strong>“Harvest now and decrypt later” attacks.<br></strong>Also known as steal now and decrypt later (SNDL) attacks, these kind of attacks are the major drivers of the shift in the industry towards quantum-era security. In these kinds of attacks, instead of waiting for quantum computers to become mainstream, the attackers intend to harvest the traditionally encrypted data so that these could be later broken by an advanced quantum computer. This poses risk to sensitive financial information. Hence, the need for post-quantum cryptography algorithms to safeguard their customer’s assets and integrity.</li><li><strong>Being future-ready for newer cryptographic algorithms.<br></strong>Proactively implementing PQC enhances the organization’s reputation as a reliable guardian of confidential financial data and shows a dedication to staying ahead of cybersecurity trends. Organizations that have already incorporated post-quantum cryptography (PQC) into their security infrastructure will be well-positioned to take advantage of upcoming cryptographic advancements, keeping a competitive edge in the quickly changing financial services industry.</li></ol><h3>Challenges for Organizations</h3><ol><li>Identification and replacement of older cryptographic functions: Safely transitioning to newer PQC algorithms will require inventorying all cryptographic assets and the need for automated centralized management allowing organizations to update to newer algorithms quickly.(Hojjati, 2023)</li><li>Increased file sizes of newer algorithms would need significantly better infrastructure for the storage and transfer of information. Organisations would need to assess the impact of newer algorithms on their existing software and system design</li><li>Standardization of PQC algorithms: The National Institute of Standards and Technology (NIST) has already initiated draft standards for new quantum-safe algorithms, with final standards expected early next year.</li></ol><h3>Conclusion</h3><p>Postquantum cryptography will replace the existing classical encryption methodologies and processes as they weaken over time and become deprecated. Now is the time for the BFSI Industry to safeguard the trust people put into the industry and work towards creating better crypto systems that seamlessly upgrade cryptographic assets as the newer security landscape gets challenging.</p><h3>References</h3><p>Hojjati, A. (2023, September 19). <em>The positive and the negative impacts of quantum computers on the finance sector</em>. Retrieved April 22, 2024, from <a href="https://www.digicert.com/blog/impact-of-quantum-computers-on-the-finance-sector">https://www.digicert.com/blog/impact-of-quantum-computers-on-the-finance-sector</a></p><p>Turner, D. M. (2023, April 17). Quantum Computing for Banks and Financial Institutions — Transformative Opportunities or a Threat to the IT Security Infrastructure. <em>Ultimate</em>. Retrieved April 22, 2024, from <a href="https://utimaco.com/news/blog-posts/quantum-computing-banks-and-financial-institutions">https://utimaco.com/news/blog-posts/quantum-computing-banks-and-financial-institutions</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a18e0fad8e84" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Loan aggregators and the Future of Lending]]></title>
            <link>https://medium.com/digital-banking-2030/loan-aggregators-and-the-future-of-lending-976f5ee1e01e?source=rss-f969e4650cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/976f5ee1e01e</guid>
            <dc:creator><![CDATA[Priyansh S.]]></dc:creator>
            <pubDate>Wed, 04 Oct 2023 06:32:19 GMT</pubDate>
            <atom:updated>2023-10-04T06:32:19.532Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aXCS9Y6Giv8CjtK4" /><figcaption>Photo by The New York Public Library on Unsplash</figcaption></figure><p>For centuries, lending has been a powerful instrument for moving towards a successful life. There are various lending options available today — home loans, personal loans, business loans, etc. and a long list of lenders — private lending companies, banks and even local lenders. Due the various options available in the market, it becomes difficult for borrowers to compare across various option, let alone collect all the necessary information from all the lenders individually — be it websites or branches.</p><h3>What is a Loan Aggregator?</h3><p>Loan aggregators, also known as loan comparison websites or loan marketplaces, are online platforms that help borrowers compare and choose loans from multiple lenders.</p><h3>Why use Loan Aggregators?</h3><p>Loan Aggregators simplify the shopping process by providing a one-shop-stop webpage, where borrowers can input their financial information and receive quotes from various lenders. The borrower can then compare loan offers from different lenders on the basis of interest rates, loan terms, fees, and other relevant information in the loan offers.</p><h3>What’s in it for borrowers?</h3><ol><li><strong>Time saving</strong>: <br>Aggregators help borrowers save the time spent on collecting information from various lenders individually through their websites or branches</li><li><strong>Convenience</strong>: <br>Aggregators make it convenient for borrowers to compare and apply from the comfort of their homes.</li><li><strong>Multi-lender access:<br></strong>Aggregators provide the once hard-to-acquire information from various lenders at the borrowers fingertips.</li><li><strong>Discovery:<br></strong>Aggregator platforms introduce you to lenders you might have otherwise not known about</li><li><strong>Transparent Comparison:<br></strong>Aggregators help make clear and transparent information making it easier for borrowers to make an informed decision. Aggregators also provide comparison tools to easily compare the various loan offers side by side.</li></ol><h3><strong>What’s in it for lenders?</strong></h3><p>Loan aggregator platforms help lenders benefit in the following aspects:</p><ol><li><strong>Increased visibility:<br></strong>Lenders are exposed to a much broader audience of potential borrowers through aggregator platforms. This may lead to increased customer acquisition and reduced customer acquisition cost. Lenders get access to a diverse set of profiles in their customer base.</li><li><strong>Streamlined processes:<br></strong>Loan aggregators reduce the administrative burden for lenders by streamlining the loan application and approval process.</li><li><strong>Competitive Insights:<br></strong>Participation in loan aggregator platforms provides lenders with insights into market trends, competitor offerings, and borrower preferences.</li><li><strong>Brand Recognition:<br></strong>Participation in reputable loan aggregator platforms enhance a lender’s brand recognition and credibility.</li></ol><h3>Key challenges faced by loan aggregators</h3><ol><li><strong>Lender selection and monitoring: </strong>Selecting reputable lenders and continuously monitoring their performance is essential. Loan aggregators need mechanisms to ensure that the lenders in their network maintain ethical practices and uphold agreed-upon standards.</li><li><strong>Regulatory Compliance: </strong>Loan aggregators operate in a highly regulated financial environment. Ensuring compliance can be complex and resource-intensive.</li><li><strong>Data Security and Privacy: </strong>Handling sensitive financial and personal information exposes loan aggregators to cybersecurity threats. Maintaining robust data security measures and complying with privacy regulations is a constant challenge.</li><li><strong>Dynamic Market Conditions: </strong>Economic fluctuations, changing interest rates and shifts in borrower behaviors impact the loan market. Aggregators need to adapt to these dynamic conditions to provide relevant and competitive offerings.</li><li><strong>Trust and Credibility: </strong>Building and maintaining trust is crucial for loan aggregators. If users perceive a lack of transparency or trustworthiness, it undermines the credibility of these platforms.</li><li><strong>User Education:</strong> Many users may not fully understand the terms and conditions of the loans presented by aggregators. Educating users about financial products and helping them make informed decisions can be a challenge.</li><li><strong>Customer complaints and disputes: </strong>Resolving customer complaints and disputes, especially when they involve the terms of loans or the actions of lenders, requires effective customer support mechanisms.</li></ol><h3>Vision for lenders moving forward</h3><p>As newer innovations and offerings like loan aggregators are penetrating into the mainstream lending markets, it’s crucial for lenders to envision newer possibilities for the future landscape.</p><p>Lenders integrating with or are planning to integrate with such platforms would develop and hone their loan offering capabilities based on standardized inputs from borrowers. With time, lenders would get better at evaluating risk and tailoring competitive offers for diverse borrower portfolios.</p><p>Building on top of these capabilities would help lenders venture further into embedded finance — providing tightly integrated financial solutions for everyday lives of customers. This huge movement towards financial services being offered through non financial services platform would be the next revolution in the age of consumerism.</p><p>We’re already approaching this confluence of financial solutions entering the daily consumption cycles of customers with digital solutions like UPI and financing solution like Buy Now Pay Later (BNPL). These are still however not as tightly coupled with the retail solutions as it could be — the vision of embedded finance.</p><h3>References</h3><ol><li>Buy Now Pay Later<br><a href="https://www.investopedia.com/buy-now-pay-later-5182291">https://www.investopedia.com/buy-now-pay-later-5182291</a></li><li>Embedded Finance<br><a href="https://www.ey.com/en_gl/banking-capital-markets/fintech-ecosystems/how-banks-are-staking-a-claim-in-the-embedded-finance-ecosystem">https://www.ey.com/en_gl/banking-capital-markets/fintech-ecosystems/how-banks-are-staking-a-claim-in-the-embedded-finance-ecosystem</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=976f5ee1e01e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/digital-banking-2030/loan-aggregators-and-the-future-of-lending-976f5ee1e01e">Loan aggregators and the Future of Lending</a> was originally published in <a href="https://medium.com/digital-banking-2030">FinTech 2030</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Game Menu in 1min : HaxeFlixel]]></title>
            <link>https://medium.com/@psangule/game-menu-in-1min-haxeflixel-fa6a8ac8909e?source=rss-f969e4650cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa6a8ac8909e</guid>
            <category><![CDATA[games]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[haxe]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Priyansh S.]]></dc:creator>
            <pubDate>Sun, 01 Sep 2019 04:36:46 GMT</pubDate>
            <atom:updated>2019-09-02T08:47:53.622Z</atom:updated>
            <content:encoded><![CDATA[<h3>Game Menu in 1 min : HaxeFlixel</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tsL-V8DFpICxZKRB" /><figcaption>Photo by <a href="https://unsplash.com/@clemono2?utm_source=medium&amp;utm_medium=referral">Clem Onojeghuo</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>Don’t feel shy to check the <a href="https://github.com/AbstractXan/haxeflixel-tutorials/tree/master/flixel-MenuAndPlayerMovement/FlixelTut/source">Github Repository</a> if you’re stuck!</blockquote><h3>Let’s code it out!</h3><p>Setup new project as follows-</p><pre># <strong>Creates template for your code in HelloWorld folder</strong><br>flixel tpl -n &quot;HelloWorld&quot;</pre><p>Update <strong>PlayState.hx</strong> as follows:</p><pre>override public function create():Void{         <br>    super.create();<br>    <strong>var text = new flixel.text.FlxText(0, 0, 0, &quot;Hello World&quot;, 64);<br>    text.screenCenter();<br>    add(text);</strong><br>}</pre><p>Run lime test html5 to open in your browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/0*BwL4Ar4O1mjHCDIR.jpeg" /></figure><p>You could also try lime test flash and lime test neko</p><h3>Game Menu</h3><p>Now that we have our PlayState setup, duplicate <strong>PlayState.hx </strong>and rename as <strong>MenuState.hx .</strong> Modify the file as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/686637b2f7c94c0adf0ac4e198fbb73f/href">https://medium.com/media/686637b2f7c94c0adf0ac4e198fbb73f/href</a></iframe><p>Now, update <strong>Main.hx’s new() </strong>function to start with <strong>MenuState</strong> as follows:</p><pre>public <em>function</em> <em>new</em>()<br>{<br>    super();<br>    addChild(new FlxGame(0, 0, <strong>MenuState</strong>));<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*rnDWPib7Gxge5JiX3ud-Ow.png" /><figcaption>Created by the Author</figcaption></figure><p><strong>Run</strong> using lime test neko</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*DLrCriMWcYYj1kTHhiURPA.jpeg" /></figure><blockquote>Stuck? <a href="https://github.com/AbstractXan/haxeflixel-tutorials/tree/master/flixel-MenuAndPlayerMovement/FlixelTut">Github Repository</a> !</blockquote><p>Where to go from here? Make your own <a href="https://medium.com/p/1c4277859b06/edit">playable character</a>!</p><h3>That’s All Folks!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa6a8ac8909e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Game Menu and Player Movement in 2 min: HaxeFlixel]]></title>
            <link>https://medium.com/@psangule/game-menu-and-player-movement-in-2-min-haxeflixel-1c4277859b06?source=rss-f969e4650cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c4277859b06</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[gamedev]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[haxe]]></category>
            <dc:creator><![CDATA[Priyansh S.]]></dc:creator>
            <pubDate>Sat, 20 Jul 2019 15:33:11 GMT</pubDate>
            <atom:updated>2019-09-01T04:49:05.048Z</atom:updated>
            <content:encoded><![CDATA[<h3>Player Movement in 1 min: HaxeFlixel</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*m1Tq06EED5kKMVBb" /><figcaption>Photo by <a href="https://unsplash.com/@wflwong?utm_source=medium&amp;utm_medium=referral">Warren Wong</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>Checkout previous posts on <a href="https://medium.com/@priyanshsangule/write-your-first-hello-world-game-screen-in-5-seconds-haxeflixel-bf3a28f7d70d">PlayerState</a> and <a href="https://medium.com/@priyanshsangule/game-menu-in-1min-haxeflixel-fa6a8ac8909e">Game Menu</a> .</blockquote><h3>Player Movement</h3><p>Create <strong>Player.hx </strong>and write the following movment functions.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5fc59afd334706a4fc3c4e7796e02b76/href">https://medium.com/media/5fc59afd334706a4fc3c4e7796e02b76/href</a></iframe><p>Here we move the character using vectors to initially set the direction according to the combination of pressed keys and then set magnitude of the vector as the speed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*6AVCp_s8jJEbo9whRQSrQg.png" /><figcaption>Created by the Author</figcaption></figure><p>Update <strong>PlayState.hx </strong>to initialize player in the <strong>PlayState</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/178a618b369bf1ac2dd18bf3de826b2b/href">https://medium.com/media/178a618b369bf1ac2dd18bf3de826b2b/href</a></iframe><h3><em>Run your game!</em></h3><p>lime test neko</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*hWv5Zac0xXB1SD7DUAH_Rw.jpeg" /><figcaption>Use WASD or Arrow keys to move!</figcaption></figure><blockquote>Stuck? Checkout the <a href="https://github.com/AbstractXan/haxeflixel-tutorials/tree/master/flixel-MenuAndPlayerMovement/FlixelTut">Github Repository</a></blockquote><h3>That’s All Folks!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c4277859b06" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Structure with Go : Stack]]></title>
            <link>https://medium.com/@psangule/data-structure-with-go-stack-3343618c7c9?source=rss-f969e4650cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/3343618c7c9</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[stack]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[data-structures]]></category>
            <dc:creator><![CDATA[Priyansh S.]]></dc:creator>
            <pubDate>Sat, 20 Jul 2019 15:06:15 GMT</pubDate>
            <atom:updated>2019-08-13T04:56:11.755Z</atom:updated>
            <content:encoded><![CDATA[<h3>Stacks — in Go!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nnnbuFgVRuWsaHKI" /><figcaption>Photo by <a href="https://unsplash.com/@auntneecey?utm_source=medium&amp;utm_medium=referral">Denise Johnson</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>Stack </em>is a very intuitive data structure. Consider a pile of books. You could either add a book at the top of the pile or remove the topmost book. But we don’t add or remove books in the middle or at the bottom. Everything happens at the top of the pile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/174/1*O1RELAuKJnTD0UE6PN7Zog.png" /><figcaption>Structure of a Stack</figcaption></figure><h3>Step 1: Understanding use cases</h3><p>A <em>stack </em>is used as follows:</p><ul><li><strong>Push : </strong>Push an element onto the stack</li><li><strong>Top : </strong>Return the top most element in the stack</li><li><strong>Pop : </strong>Returns the value of the top element and removes it from the stack</li><li><strong>Length :</strong> Length returns the number of elements in the stack</li></ul><h3>Step 2: Decide what data structures to build upon</h3><p>We’ll implement <em>stack </em>using our <a href="https://medium.com/@priyanshsangule/data-structures-with-go-linked-list-d1b11c1a90e0">prebuilt</a> <em>Linked List</em>. This seems fairly intuitive from the following image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*ghMsXWAaEyaMLCfRTLpoyA.png" /><figcaption>Implementation of Stack using Linked List</figcaption></figure><p>Here the <strong>top of the stack </strong>is similar to the <strong>tail of the list. </strong>This is because we could <strong>add</strong> or <strong>remove</strong> elements on top of the <em>stack,</em> the same way we could at the end of the <em>list</em>. This way, the elements will retain the order in which they stack.</p><h3>Step 3: Voilà! Get your hands dirty!</h3><p>Create a new file with path ‘ <strong>stack/stack.go ’ </strong>in your GOPATH. Import the <strong>list </strong>package to create your <em>stack</em><strong><em> </em></strong>structure as follows</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2afdb82f06355644b68570eec1392978/href">https://medium.com/media/2afdb82f06355644b68570eec1392978/href</a></iframe><h4>1. Push(newVal)</h4><p>The <strong>Push</strong> function appends the new value to the <strong>tail </strong>of the list which is similar to adding it to the <strong>top </strong>of the stack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*DHMo5KsunZBuksEaaSOtAg.png" /><figcaption>Implementation of <strong>Push function</strong></figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a7d362e69dbc6ed4fc08513946436dfd/href">https://medium.com/media/a7d362e69dbc6ed4fc08513946436dfd/href</a></iframe><h4>2. Top()</h4><p>The <strong>Top</strong> function returns the <strong>tail value </strong>which is similar to returning the top element of the stack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*RkxJ4DEIH9xMcr9FoOH3FQ.png" /><figcaption>Implementation of <strong>Top function</strong></figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/955d64b96822beb4dc900d7dfcbb5d8a/href">https://medium.com/media/955d64b96822beb4dc900d7dfcbb5d8a/href</a></iframe><h4>3. Pop()</h4><p>The <strong>Pop</strong> function returns the <strong>tail value before deleting the tail altogether. </strong>This serves our purpose of returning the top element of the stack before removing it from the stack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*eYkqYYOvd9L78gLL5Ur20A.png" /><figcaption>Implementation of <strong>Pop function</strong></figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1f6ef0be767b9f58ff438733c01fd07b/href">https://medium.com/media/1f6ef0be767b9f58ff438733c01fd07b/href</a></iframe><h4>4. Length()</h4><p>The <strong>Length</strong> function returns the <strong>length of the list </strong>i.e the number of elements in the stack.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/48607c6c2552927dc5bb0d623063af69/href">https://medium.com/media/48607c6c2552927dc5bb0d623063af69/href</a></iframe><h3>Running our code</h3><p>Update main.go file in <strong>GOPATH/src/main </strong>and use your new data structure!</p><pre>package <strong>main<br></strong>import &quot;<strong>stack&quot;</strong><br>import &quot;<strong>fmt</strong>&quot;func <strong>main</strong>(){<br>    var <strong>s</strong> <strong>stack.Stack</strong><br>    <strong>s</strong>.<strong>Push</strong>(1)<br>    fmt.Println(&quot;Top: &quot;, <strong>s.Top()</strong>) // 1<br>    <strong>s.Push</strong>(2)<br>    fmt.Println(&quot;Top: &quot;, <strong>s.Top()</strong>) // 2<br>    fmt.Println(&quot;Popped: &quot;, <strong>s.Pop()</strong>) // 2<br>    fmt.Println(&quot;Top: &quot;, <strong>s.Top()</strong>) // 1<br>}</pre><p>Run go run main.go to run your code.</p><blockquote>Have issues? Check out the Github Repository : <a href="https://github.com/AbstractXan/DataStructuresWithGo/tree/master/src/stack">Github link</a></blockquote><h3>Step 4: Homework</h3><ul><li><strong>DeleteMiddle() : </strong>Deletes the middle element of the stack</li><li><strong>Reverse() : </strong>Reverse the order of the stack element</li><li>Check if a given number is a <a href="https://en.wikipedia.org/wiki/Palindrome">palindrome</a> using stack.</li></ul><h3>Applications</h3><ul><li>Stacks are used by <em>parsers to </em>parse expressions like 2+3/4</li><li>Stacks are used to solve various problems involving Last In, First Out strategy.</li></ul><h3>That’s all folks!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3343618c7c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Write your first ‘Hello World’ Game Screen in 5 seconds : HaxeFlixel]]></title>
            <link>https://medium.com/@psangule/write-your-first-hello-world-game-screen-in-5-seconds-haxeflixel-bf3a28f7d70d?source=rss-f969e4650cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf3a28f7d70d</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[haxe]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[gaming]]></category>
            <dc:creator><![CDATA[Priyansh S.]]></dc:creator>
            <pubDate>Tue, 16 Jul 2019 12:55:27 GMT</pubDate>
            <atom:updated>2019-07-16T14:05:25.641Z</atom:updated>
            <content:encoded><![CDATA[<h3>Write your first ‘Hello World’ Game Screen in 5 seconds : HaxeFlixel</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*A5w_HjTuL5HeYmno" /><figcaption>Photo by <a href="https://unsplash.com/@siora18?utm_source=medium&amp;utm_medium=referral">Siora Photography</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Why HaxeFlixel?</h3><p>HaxeFlixel helps you create cross-platform games easier and free — using just one codebase. One can cross compile games natively to Windows, Linux, Mac, Android, iOS, Flash and HTML5.</p><h3>Setup</h3><p>Install <a href="https://haxe.org/download/version/4.0.0-rc.2/">Haxe</a> and <a href="https://haxeflixel.com/documentation/install-haxeflixel">HaxeFlixel</a>.</p><p>Now run the following-</p><pre>haxelib install lime <br>haxelib install openfl <br>haxelib install flixel</pre><pre># <strong>Installs additional libraries</strong><br>haxelib run lime setup flixel</pre><pre># <strong>Installs lime command</strong><br>haxelib run lime setup</pre><pre># <strong>Install flixel command</strong><br>haxelib install flixel-tools <br>haxelib run flixel-tools setup</pre><h3>Let’s code it out!</h3><p>Setup new project as follows-</p><pre># <strong>Creates template for your code in HelloWorld folder</strong><br>flixel tpl -n &quot;HelloWorld&quot;</pre><p>Update <strong>PlayState.hx</strong> as follows:</p><pre>override public function create():Void{         <br>    super.create();<br>    <strong>var text = new flixel.text.FlxText(0, 0, 0, &quot;Hello World&quot;, 64);<br>    text.screenCenter();<br>    add(text);</strong><br>}</pre><p>Run lime test html5 to open in your browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*vFPHlYf8xg4yJkvYIxyGEw.jpeg" /></figure><p>You could also try lime test flash and lime test neko</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf3a28f7d70d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linked Lists — in Go!]]></title>
            <link>https://medium.com/@psangule/data-structures-with-go-linked-list-d1b11c1a90e0?source=rss-f969e4650cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1b11c1a90e0</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[linked-lists]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data-structures]]></category>
            <dc:creator><![CDATA[Priyansh S.]]></dc:creator>
            <pubDate>Fri, 12 Jul 2019 19:23:42 GMT</pubDate>
            <atom:updated>2019-11-11T03:20:43.663Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Xiqr3dcyWpRUuKR4" /><figcaption>Photo by <a href="https://unsplash.com/@opticonor?utm_source=medium&amp;utm_medium=referral">Conor Luddy</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>A singly <a href="https://en.m.wikipedia.org/wiki/Linked_list">linked list</a> of positive integers, is a linear data structure where one data element points to another but not vice versa. This creates a <strong>single direction traversable list of elements</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*YwIk-z4u9ITugEDw-aFzVw.png" /><figcaption>Linked List Structure</figcaption></figure><p>The variable pointing to the <strong>first</strong> element is called the <strong>head </strong>of the list. Linked list traversal begins from the head and keeps on going through until there are no more elements to point to.</p><p>The variable pointing to the <strong>last</strong> element is called the <strong>tail</strong> of the list. The tail helps keeping track of the last node and makes it easy to append new elements to the list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*ZrRi1u0wZJgEJByexskOJw.png" /><figcaption>Linked List : Head and Tail Pointers</figcaption></figure><h3>Step 1: Understanding Use Cases</h3><p>Linked lists are used in the following ways :</p><ul><li><strong>Insert</strong> : Insert a node to the end of the list</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*yU3Qz_lgukTu0onUiMF9ZA.png" /><figcaption>Inserting a node at the end of the list</figcaption></figure><ul><li><strong>Search</strong> : Returns node position with given value.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*SG4-5_eeXDBAtnnFVI_55Q.png" /><figcaption>Searching for a node by traversing through the list</figcaption></figure><ul><li><strong>DeleteVal</strong> : Delete a node given a value</li><li><strong>DeleteAt </strong>: Delete a node given a position</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*PmrON1TChd3IwZ4ADbywog.png" /><figcaption>Node Deletion</figcaption></figure><ul><li><strong>GetAt </strong>: Return node value at given position</li></ul><p>Other use cases include:</p><ul><li>Linked list <strong>element positioning starts from 1</strong></li><li><em>Search</em> and <em>GetAt</em> functions return <strong>-1</strong> when no such node exists.</li></ul><h3>Step 2: Decide what data structures to build upon</h3><p>We’ll build our linked list by creating a small unit called a <em>node. </em>The structure of a node will include an integer <em>value</em> and a reference <a href="https://tour.golang.org/moretypes/1">pointer</a> to the <em>next</em> node.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*UnsMkJAmhwhkpbMR8lCXkA.png" /><figcaption>Node</figcaption></figure><p>Finally, our linked list should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*YwIk-z4u9ITugEDw-aFzVw.png" /><figcaption>Linked List Structure</figcaption></figure><h3>Step 3: Helper functions and variables</h3><p>We create the following helper functions to ease our develpoment process:</p><ul><li><strong>previousNode : </strong>Returns the node previous to the given position. This is particularly useful for deletion function. As we need to update the reference for the node prvious to the deleted one.</li><li><strong>insertAfter : </strong>Inserts a node after a given node.</li><li><strong>getNode : </strong>Returns the node at the given position</li></ul><h3>Step 4: Let’s start coding</h3><p>Begin by creating a custom list package by creating <strong>‘ src/list/ ’ </strong>folder in GOPATH with <strong>list.go </strong>file</p><p>Remember to include package list at the beginning of the file to specify the package.</p><p>Basic <em>node </em>unit:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*UnsMkJAmhwhkpbMR8lCXkA.png" /><figcaption>Node Structure</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f2b8f52dbf60fd98e03ec76d7ff8bd2/href">https://medium.com/media/7f2b8f52dbf60fd98e03ec76d7ff8bd2/href</a></iframe><p>Creating an <a href="https://tour.golang.org/basics/3">exportable</a> <em>linked list</em> structure:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2b085f41833ed8f2e0d40f5c5b8a8d2/href">https://medium.com/media/f2b085f41833ed8f2e0d40f5c5b8a8d2/href</a></iframe><h3><strong>Helper functions</strong></h3><h4><strong>1. Previous Node :</strong></h4><p>To return the node previous to the given position <strong>pos </strong>, we need to traverse <strong>pos-2 </strong>nodes. (As pos-2 node’s next will give pos-1 node).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*IbIp4qALWhooEPFOABn1kA.png" /><figcaption>previousNode Implementation</figcaption></figure><p>We deal with out of bounds positions by returning head and tail for exceeding left and right bounds respectively. This is just my own implementation and you’re free to handle it however you want.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/42df1606ec9e8679e23b48c56847879f/href">https://medium.com/media/42df1606ec9e8679e23b48c56847879f/href</a></iframe><h4>2. Insert After:</h4><p>This function inserts a node with a given value <strong>Val </strong>after a given node <strong>ptr</strong>. We create a node <strong>temp</strong> which stores this value <strong>Val</strong> and then to integrate it to the linked list, we point <strong>temp.next </strong>to<strong> ptr.next</strong>. This maintains the flow of the linked list. And now, since the <strong>temp</strong> node<strong> </strong>should come after <strong>ptr</strong>, we update <strong>ptr.next </strong>to <strong>temp</strong> address.</p><p>If the insertion occurs at the end of the linked list, we should update the <strong>tail </strong>of the list. <strong>Donot forget</strong> to increment the length of the list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*SGeiOIJrd2F-STvkQUxX1A.png" /><figcaption>InsertAfter Implementation</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3728a519810f5c387a312bf316991e10/href">https://medium.com/media/3728a519810f5c387a312bf316991e10/href</a></iframe><h4>3. Get Node:</h4><p>Get Node helper function simply traverses through the nodes to return the node at the <strong>pos</strong> position. If the position is invalid, we return <strong>nil</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*9MWpo8MFnZT0IePTTvx5eA.png" /><figcaption>getNode implementation</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/31d61e8f6038bc1665a99a52d07a027e/href">https://medium.com/media/31d61e8f6038bc1665a99a52d07a027e/href</a></iframe><h3>Use Case Functions</h3><h4><strong>1. Insert(value)</strong></h4><p>Insert function inserts a node to the end of the list. For a linked list with no data, head will be <strong>nil.</strong> Otherwise, we insert the new value after the tail, using our <strong>insertAfter</strong> helper function. See? How helpful they are!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*yU3Qz_lgukTu0onUiMF9ZA.png" /><figcaption>Insert function implementation</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/94ab6c61d03fb5a55d1d861248e83f68/href">https://medium.com/media/94ab6c61d03fb5a55d1d861248e83f68/href</a></iframe><h4>2. Search(value)</h4><p>Search function returns node position with given value by traversing through the list. If the desired node is not found, it returns -1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*V6KDf19XdBTo9ZOpmB3s0Q.png" /><figcaption>Search implementation</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1a01ef0c39ea7b7e96f72357b3aba966/href">https://medium.com/media/1a01ef0c39ea7b7e96f72357b3aba966/href</a></iframe><h4>3. DeleteAt(position)</h4><p>DeleteAt function deletes a node at a given position.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*PmrON1TChd3IwZ4ADbywog.png" /><figcaption>DeletAt Implementation</figcaption></figure><ul><li>If the given position is out of bounds — do nothing</li><li>If head is to be removed, just update the head pointer. Unlike C, you don’t have to worry about deallocating the previous head we just detached from our linked list. Go does that for you.</li><li>Find previous node to the position — say <strong>prev</strong>. Update <strong>prev.next </strong>as <strong>prev.next.next. </strong>This removes the desired node to be deleted.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8ed5c295d7634a7125a6226f00a4655e/href">https://medium.com/media/8ed5c295d7634a7125a6226f00a4655e/href</a></iframe><h4>4. DeleteVal</h4><p>DeleteVal searches for and deletes the first node it could find with a given value. It’s simple to implement by using Search and DeleteAt functions.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8a84a3bdd6acabc076d5eb22465a598b/href">https://medium.com/media/8a84a3bdd6acabc076d5eb22465a598b/href</a></iframe><h4>5.GetAt</h4><p>GetAt function returns a node’s value, given it’s position. We’ll use the <strong>getNode</strong> helper function to get the desired node and return it’s value. If no such node exists, we return -1.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c4627bca64bff31ef1abe0f5f2e06ba0/href">https://medium.com/media/c4627bca64bff31ef1abe0f5f2e06ba0/href</a></iframe><p>Note that implementation details may vary from person to person. Here I implemented the Linked List functions so that user doesn’t need to handle <em>node level </em>details. One could export all the types and functions for providing more flexibility to the user.</p><h3>Running our code</h3><p>Create main.go file in <strong>GOPATH/src/main </strong>and use your new data structure!</p><pre>package <strong>main</strong></pre><pre>import &quot;<strong>list&quot;</strong><br>import &quot;<strong>fmt</strong>&quot;</pre><pre>func <strong>main</strong>(){<br>    var <strong>l list.List<br>    l.insert</strong>(2)<br>    <strong>l.insert</strong>(1)<br>    fmt.Println(<strong>l.getAt</strong>(2)) //Output: 1<br>}</pre><p>Run go run main.go to run your code.</p><p>Have issues? check out the Github Repository : <a href="https://github.com/AbstractXan/DataStructuresWithGo/tree/master/src/list">Github link</a></p><h3>Step 5: Homework</h3><p>Try and create your own functions for these use cases:</p><ul><li><strong>Print</strong> : Prints the linked list elements</li><li><strong>Reverse : </strong>Reverse the linked list</li><li><a href="https://www.geeksforgeeks.org/rotate-a-linked-list/"><strong>Rotate</strong></a></li></ul><h3>Applications</h3><ul><li>Implementing <em>stacks</em> and <em>queues</em>. (Which we’ll look upon in future lessons)</li><li>Implementing arithmetic operations on long integers.</li><li>Manipulation of polynomials by storing constants in the node of linked list.</li></ul><h3>Conclusion</h3><p>Linked lists are awesome data structures for dynamically storing data. We’ve seen various ways in which we manipulate data in a linked list- insert, delete, search and getAt functions.</p><h3>That’s all folks!</h3><blockquote>Github Repository : <a href="https://github.com/AbstractXan/DataStructuresWithGo/tree/master/src/list">Github link</a> | Next Up : <a href="https://medium.com/@priyanshsangule/data-structure-with-go-stack-3343618c7c9">Stacks — in Go!</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1b11c1a90e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Structures with Go: Basics]]></title>
            <link>https://medium.com/@psangule/data-structures-with-go-basics-178bd6d36a08?source=rss-f969e4650cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/178bd6d36a08</guid>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[go]]></category>
            <dc:creator><![CDATA[Priyansh S.]]></dc:creator>
            <pubDate>Thu, 04 Jul 2019 13:01:25 GMT</pubDate>
            <atom:updated>2019-07-12T20:21:25.391Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tUeooRyKtZZFfhSA" /><figcaption>Photo by <a href="https://unsplash.com/@franckinjapan?utm_source=medium&amp;utm_medium=referral">Franck V.</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This lesson will help you learn how to create existing &amp; custom data structures using Go. For simplicity, we’re using the example of a <em>stack.</em></p><h3>Step 1: Understanding use cases</h3><p>Understand how the data structure will be used. For instance, a <em>stack </em>is used as follows:</p><ul><li><strong>Push : </strong>Push an element into the stack</li><li><strong>Pop : </strong>Return and remove the top element in the stack</li><li><strong>Peek : </strong>Return the top elements in the stack</li></ul><h3><strong>Step 2: Decide what data structures to build upon</strong></h3><p>Any new data structure we create can be built upon predefined datatypes or using any other data structure.</p><p>For example- A <em>stack </em>could be made in various ways including <em>Linked List and Arrays. </em>One could create their own structures to work with. We will see this in future lessons.</p><h3>Step 3: Figure out the helper functions and variables</h3><p>A data structure might use helper functions and variables to help the data structure functions work.</p><p>For example, <em>stack </em>could keep track of a <em>size </em>variable which stores the number of elements in the stack. The <strong>Peek </strong>function could be reused by the <strong>Pop</strong> function to return the top variable.</p><h3>Step 4: Voilà! Get your hands dirty!</h3><p>It’s time we get down to business and start making some data structures. Follow the link for next post in this series:</p><p>Data Structures with Go: Linked List [<a href="https://link.medium.com/qsZYs9CSgY">https://link.medium.com/qsZYs9CSgY</a>]</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=178bd6d36a08" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>