<?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 Drishty Ganatra on Medium]]></title>
        <description><![CDATA[Stories by Drishty Ganatra on Medium]]></description>
        <link>https://medium.com/@drishty-ganatra66?source=rss-98efbe8afdc7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4VlvY2YkLCm_d0u42HKc5Q.jpeg</url>
            <title>Stories by Drishty Ganatra on Medium</title>
            <link>https://medium.com/@drishty-ganatra66?source=rss-98efbe8afdc7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 06:20:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@drishty-ganatra66/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[Cisco 6 month intern + FTE offer via Code-with-Cisco | Off-campus]]></title>
            <link>https://medium.com/codess-cafe/cisco-6-month-intern-fte-offer-via-code-with-cisco-off-campus-f4bf8028c6d4?source=rss-98efbe8afdc7------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4bf8028c6d4</guid>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[cisco]]></category>
            <category><![CDATA[internships]]></category>
            <category><![CDATA[interview-experience]]></category>
            <category><![CDATA[swe-intern]]></category>
            <dc:creator><![CDATA[Drishty Ganatra]]></dc:creator>
            <pubDate>Wed, 17 Jan 2024 10:48:19 GMT</pubDate>
            <atom:updated>2024-01-17T16:37:44.221Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“What’s meant for you will find its way💙!”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UTcUUTa3l14BicB3Bin0Xg.gif" /></figure><p>Greetings, dear readers! I’m Drishty Ganatra, a final-year Computer Engineering student at Vishwakarma Government Engineering College. My journey in the search for off-campus internships and securing full-time job offers has been quite the rollercoaster.</p><p>Despite facing repeated setbacks and making it extremely close to the finish line only to stumble, there came a point where optimism dropped off. But it now appears that each encounter with failure in previous interviews served as a valuable lesson, paving the way to where I am today!</p><p>Through this blog, I will be sharing details about how I bagged a 6M Intern + FTE (Full Time Employment) opportunity at Cisco through Code-with-Cisco.</p><h4>Overall Timeline:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3YO9Fmys2DLLASJf3JVi1A.png" /></figure><h4>Bagging the chance to participate in the hiring process:</h4><p>Cisco hires Software Engineering Summer Interns as well as Winter Interns (+FTE) via the C<strong>ode-with-cisco hackathon</strong>.</p><p>Approximately 23 teams were selected, having 3 members each for the final round after the group assessment. Sadly, my team didn’t make it to the finals, so I am not the right person to discuss the hackathon experience but rather discuss the hiring opportunity through it.</p><h4>The Group Assessment:</h4><p>It was supposed to be given by <strong>3 team members</strong> of the team together. It consisted of <strong>3</strong> medium to hard-level questions to be completed in one hour. Out of which, we solved 3 out of 3 within 40 minutes.</p><p>Few teams were given a chance to be a part of the hiring process based on their group assessment performance, and the team members were given an individual assessment.</p><h4>Individual assessment:</h4><p>It consisted of MCQs (Mixtures of CS fundamentals like Networking, OS, a few hardware-related questions from Microprocessors, etc…) and 2 DSA-based problems. I was able to solve 1.5 / 2 DSA problems. Clearing the round, I received mail for interviews.</p><h4>Interview Experience and Tips:</h4><blockquote>All the interviews felt like a healthy discussion rather than interviews💙.</blockquote><p>All the rounds were <strong>eliminatory</strong> in nature, and all the communication related to interviews was done over the <strong>WebEx</strong> platform.</p><h4>[1] Technical Round: 18th Oct’23 (1 hour 15 mins)</h4><p>Discussions on <strong>CS fundamentals — </strong>OS, CN, DBMS, DSA (practical application-based questions). Be strong with the basic fundamentals and keep answering what comes to the top of your mind while dealing with some <strong>practical questions in interviews. They</strong> eventually help if they feel you are trying out.</p><p>Some of the interview questions:</p><ol><li>Implement Stack using queues.</li><li>Practical questions on semaphores in Operating systems.</li><li>How memory is allocated in the stack and heap, basically deep dive into static and dynamic memory allocation.</li><li>Which is your favorite project? Explain it. (Then dived deeper into technical details and alternatives)</li></ol><blockquote>Tip: Research a few of Cisco’s products and prepare a few questions before the round and ask them to the interviewer at the end.</blockquote><h4><strong>[2] Managerial Round: </strong>18th Oct’23 (1 hour 20 mins)</h4><p>The managerial round was actually a combination of 80% technical questions and 20% managerial round-based questions.</p><p>Some of the interview questions:</p><ol><li>Medium-level doubly-linked list problem.</li><li>Why I use <strong>linux</strong> over windows and discussion ended around security in linux.</li><li>Deep discussions over the projects (basically <strong>a why and how question</strong> for everything you respond).</li><li>Questions around<strong> Classful</strong> addressing, <strong>multicasting</strong>, IP address, etc.</li><li>What happens when you type <strong>Cisco dot com on the web browser</strong>(DNS, caching, client-server architecture, request-response, etc …)</li><li>How would you <strong>debug</strong> if you found that packets are not reaching <strong>NIC?</strong></li><li>Mathematical pattern-based puzzle.</li></ol><blockquote>Pick your project and be ready with a few of the questions related to it like <strong>why this tech-stack</strong>? What were the <strong>alternatives</strong> of using this library/framework? Be thorough with how to implement the <strong>library from scratch</strong> in case you used any. Do brainstorm about few <strong>technical errors</strong> you faced and how you overcame them.</blockquote><p>Prepare answers to managerial questions like :</p><ul><li>When and how you led a project.</li><li>What were some of the <strong>major issues</strong> you faced?</li><li>How would you <strong>overcome</strong> the fact that one of the teammates is <strong>least interested</strong> in the work?</li><li>Why Cisco? Why this role?</li></ul><p>And related questions.</p><blockquote>Be Real, Be Yourself, and Be Confident!</blockquote><h4><strong>[3] Executive Round: </strong>19th Oct’23 (1 hour 20 mins)</h4><ul><li>Implementation of <strong>Python</strong> <strong>library</strong> mentioned in one of my projects, which we generally use by calling it, but he asked what if we have to <strong>build one from scratch</strong>, what <strong>data structures</strong> would be used, how the <strong>data</strong> goes into it, how will the <strong>algorithm</strong> look like, didn’t ask to code but was really an interesting discussion.</li><li>Deep dive into the projects mentioned in the resume, with similar kinds of questions as mentioned in previous sections.</li><li>Furthermore, I was asked about my approach to learning new topics or subjects, and this led the discussion to my technical blogs.</li></ul><blockquote>In the interviews, take the control of the chat and lead it to some interesting stuff about you!</blockquote><h4><strong>[4] ETR Round: </strong>19th Oct’23 (15 mins)</h4><p>This round was very short compared to the other rounds. Prepare answers for questions like Why Cisco? , How do you see yourself after 2 years? , Will you be pursuing a master’s or not? , Cisco competitors, etc… The HR questions discussion was then followed by a CTC breakup.</p><ul><li>I would suggest preparing rough answers to common HR questions priorly: <a href="https://www.interviewbit.com/hr-interview-questions/">https://www.interviewbit.com/hr-interview-questions/</a></li></ul><h4>Result Time:</h4><p>And the “One day it will rain” came true.🥹</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*kE-MDjHOvDnSUClNC7UdPw.png" /><figcaption>Context: <a href="https://www.linkedin.com/posts/drishty-ganatra_ghc2022-activity-6941030687957221376-XrCw">https://www.linkedin.com/posts/drishty-ganatra_ghc2022-activity-6941030687957221376-XrCw</a></figcaption></figure><h4>Resources I used to prepare:</h4><p>Here’s a sheet of resources I used to prepare for interviews, including puzzles, operating systems, computer networks, database management systems, object-oriented programming, data structures and algorithms, aptitude, and SQL.</p><p><a href="https://docs.google.com/spreadsheets/d/1uQRYubklnnHRujcP8xnE2_APAXzGeCO1pMFuhOiGGmk/edit?usp=sharing">Interview prep resources - Drishty Ganatra</a></p><p>Please reach out to me over <a href="http://www.linkedin.com/in/drishty-ganatra">LinkedIn</a> if there’s something I missed to cover. I will be super happy to help! If the blog was helpful, show some love and smash the clap button below, and do follow Codess.Cafe for more such articles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*2c15dcBW29eNaKuk72lgaA.gif" /></figure><p>Codess.Cafe: <a href="https://www.linkedin.com/company/codesscafe/">LinkedIn</a> | <a href="https://www.youtube.com/channel/UC91cziHilAn3tsk30wxbHvA">YouTube</a> | <a href="https://codess.cafe/">Website</a> | <a href="https://medium.com/codess-cafe">Medium</a> | <a href="https://twitter.com/CodessCafe">Twitter</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4bf8028c6d4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codess-cafe/cisco-6-month-intern-fte-offer-via-code-with-cisco-off-campus-f4bf8028c6d4">Cisco 6 month intern + FTE offer via Code-with-Cisco | Off-campus</a> was originally published in <a href="https://medium.com/codess-cafe">Codess.Cafe</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google SWE Intern’23 Interview experience [3 rounds]]]></title>
            <link>https://drishty-ganatra66.medium.com/google-swe-intern23-interview-experience-3-rounds-5aaf75089f61?source=rss-98efbe8afdc7------2</link>
            <guid isPermaLink="false">https://medium.com/p/5aaf75089f61</guid>
            <category><![CDATA[google-interview]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[Drishty Ganatra]]></dc:creator>
            <pubDate>Wed, 25 Jan 2023 11:19:15 GMT</pubDate>
            <atom:updated>2023-01-25T11:36:24.932Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey all! This is something I was waiting to write on since months! There was a freeze and followed by this, today I received the mail that <strong>“The position is closed as of now, so we cannot move ahead with your application, however we are keeping the application on standby if the same/similar position opens up.”</strong></p><p>This whole episode holds a very big place in my heart because <strong><em>the amount of hopes it built within me is much greater than the hopes that just got shattered today </em></strong>🦋!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*tSDLAkkXaJzhgR-NoTQdVA.gif" /></figure><h3>Introduction and a back story of Hope-gains:</h3><p>Hey Everyone! I am Drishty Ganatra, a pre-final year student from Vishwakarma Government Engineering College. Here, I’ll be sharing my <strong>interview experience with Google for SWE Intern 2023 and how that call for one extra round of interview had refilled my hopes!</strong></p><p>A little back story, <em>in December 2021,</em> <strong>I had my very first technical interview and the company was Google!</strong> It was the interview for <strong>Google STEP Intern</strong>, that was <strong>the day which poured the hopes that I might be capable of grabing such off-campus offers</strong> as well, else I used to believe that my resume can never be shortlisted for a company like Google!</p><p>Rolling back to <strong>September 2022</strong> where I got interview call for 2 interviews with Google for SWE intern’23 position, it again poured the ray of hope. On 27th Sepember, 2022 where the call said that hiring committee decided to have additional round of interview, <strong>this again doubled my hopes</strong>! That comment from interviewer at the end of additional 3rd round that <strong>“Hoping to see you at Google next year”</strong> sky rocketed my confidence!</p><h3>How and when did I apply for Google SWE Intern’23 position?</h3><ul><li>Back in July 2022, I applied to this position<strong> with a referral</strong>. Referrals play a major role, do spend some time to seek for referral, I would suggest! Here’s my <a href="https://medium.com/@drishty-ganatra66/referral-the-catalyst-to-get-interviews-8a9d029686cc">article</a> on referrals and referral template which I generally use! ✨</li><li>On 5th September, 2022, I received a mail stating that resume is shortlisted and they would like to schedule two technical interviews and asked to complete a survey.</li><li>On 13th September, 2022, received a mail which asked for time and date slots.</li><li>My interviews were scheduled on 20th and 21st September, 2022. These were <strong>DSA based interviews</strong>, <strong>45–50 mins each</strong>.</li></ul><h3>2 weeks of Interview-specific prep</h3><p>As soon as I got to know on 5th September that I might have interviews this month, I started revising and preparing specifically for this.</p><ol><li>I went through the interview experiences’ <strong>articles</strong> from medium, dev[.]to, geeksforgeeks etc and prepared a list of topics and <strong>plan for 2 weeks</strong>. Here’s the list of few articles I had referred to:</li></ol><p>→ <a href="https://dev.to/siddhantkcode/google-swe-summer-intern-2022-interview-experience-4kfc">https://dev.to/siddhantkcode/google-swe-summer-intern-2022-interview-experience-4kfc</a></p><p>→ <a href="https://takeuforward.org/interview-experience/google-india-interview-experienceswe-intern-set-1/">https://takeuforward.org/interview-experience/google-india-interview-experienceswe-intern-set-1/</a></p><p>→ <a href="https://www.geeksforgeeks.org/google-interview-experience-set-7-software-engineering-intern/">https://www.geeksforgeeks.org/google-interview-experience-set-7-software-engineering-intern/</a></p><p>→ <a href="https://salonix.medium.com/my-google-swe-intern-2022-experience-98a6ce99ebf0">https://salonix.medium.com/my-google-swe-intern-2022-experience-98a6ce99ebf0</a></p><p>2. Sharing some amazing <strong>leetcode articles</strong> which I had referred:</p><p>→ <strong>Graphs</strong>: <a href="https://leetcode.com/discuss/general-discussion/655708/graph-for-beginners-problems-pattern-sample-solutions/">https://leetcode.com/discuss/general-discussion/655708/graph-for-beginners-problems-pattern-sample-solutions/</a></p><p>→ <strong>Trees</strong>: <a href="https://leetcode.com/tag/tree/discuss/1337373/Tree-question-pattern-oror2021-placement">https://leetcode.com/tag/tree/discuss/1337373/Tree-question-pattern-oror2021-placement</a></p><p>→ <strong>strings</strong>: <a href="https://leetcode.com/discuss/study-guide/1333049/Collections-of-string-questions-pattern-for-upcoming-placement-2021">https://leetcode.com/discuss/study-guide/1333049/Collections-of-string-questions-pattern-for-upcoming-placement-2021</a></p><p>→ <strong>DP</strong>: <a href="https://leetcode.com/discuss/general-discussion/662866/Dynamic-Programming-for-Practice-Problems-Patterns-and-Sample-Solutions">https://leetcode.com/discuss/general-discussion/662866/Dynamic-Programming-for-Practice-Problems-Patterns-and-Sample-Solutions</a></p><p>3. I had revised the DSA udemy course by Coding minutes, revised Striver’s Graph series, revised Aditya verma’s DP playlist and revised some standard questions on topics like stacks, queues, LinkedList, etc.</p><p>4. Covered few questions from CP-fav topics binary search, greedy, etc</p><p>5. I had one mock interview</p><p>6. Additionally, I used to solve questions by thinking out loud and used to <strong>practice writing the approach and code on Google doc</strong>, because similar kind of interface is provided in interviews.</p><p>Then came the D-day!</p><h3>First Interview Experience [Bad 🥺]:</h3><ul><li>The first interview went horribly bad and not at all according to my expectations. Cannot reveal the question, but it was a Graph question most probably.</li><li>I said my approach but was not at all getting positive/negative validations from interviewer which blacked me out!</li><li>At the end, he was not happy with my approach till the end, and I totally lost my hopes!</li><li>Gathered some courage and started the prep for next day</li></ul><h3>Second Interview Experience [Good 😀]:</h3><ul><li>The second interview started with my intro and then we jumped to the question.</li><li>Again, cannot reveal the question but this was a Graph question which was similar to a <strong>Leetcode Hard Question.</strong></li><li>I was able to give the approach in 10–15 mins and he replied positively and asked to code.</li><li>Still 15 mins were left so he gave me another question which was a <strong>DP question.</strong></li><li>I gave the approach, we discussed the complexities and I coded the recursive approach and the memoized it.</li><li>Over all he gave a positive feedback and I was dancing with joy as first one was not upto my expectation, but solving 2 questions completely in 2nd round boosted my confidence!</li></ul><h3>Additional Round [Good 😀]:</h3><ul><li>After 6 days, I received the mail on 27th September, 2022 stating that the hiring committee has decided to conduct additional round. This was a very big thing for the girl who believed that her resume might not get shortlisted for such big-tech companies!</li><li>Additional 3rd round was scheduled on 30th September, 2022, it started with introduction and we jumped to the problem.</li><li>It was a DP problem, I shared the approach and discussed the complexities and she agreed with the approach. I coded it and still there were around 20 mins left.</li><li>She gave a follow up question, for which I again gave the recursive approach and then memoized it.</li><li>The interview ended with this comment from her, “<strong>Hoping to see you at google next year</strong>”. Honestly, this comment and solving 2 DP problems in 45 mins took me to cloud nine 🌧️</li></ul><p>I tried to reach out to them via mails but they said that the position is currently on hold. Today, on 25th January, 2023, I received the mail stating that “<strong>The position is closed as of now, so we cannot move ahead with your application, however we are keeping the application on standby if the same/similar position opens up.” </strong>❤️‍🩹</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5aaf75089f61" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solving a LeetCode problem with Blockchain concept ]]></title>
            <link>https://medium.com/coinmonks/solving-a-leetcode-problem-with-blockchain-concept-8d985c2ad66f?source=rss-98efbe8afdc7------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d985c2ad66f</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[merkle-tree]]></category>
            <category><![CDATA[leetcode]]></category>
            <dc:creator><![CDATA[Drishty Ganatra]]></dc:creator>
            <pubDate>Fri, 23 Dec 2022 04:26:51 GMT</pubDate>
            <atom:updated>2023-01-04T09:27:08.557Z</atom:updated>
            <content:encoded><![CDATA[<p>I am just amazed to see that an <strong>Easy Leetcode problem</strong> can teach us a concept which is used in <strong>BlockChain</strong> for decentralization🤯. Let us wear the <strong>magic glasses</strong> giving us <strong>different perspective to view this question</strong>!</p><p>A <strong>sneak-peek</strong> to the concept 🤫: We will be using <strong>Merkle Trees</strong></p><h3>⁕ The Problem:</h3><p><a href="https://leetcode.com/problems/subtree-of-another-tree">https://leetcode.com/problems/subtree-of-another-tree</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*ooG8w2G0mDM4lVDtlE73Pw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/0*bHzFipwJxZrve3Qi.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*xFTcoLTKBYFvZxHkKj_Zrg.png" /></figure><h3>⁕ General approach :</h3><p>The Naive approach is to simply have a function isSameTree and run this recursively for to check if their roots match along with the subtree! Well, <strong>not going deeper into this explanation as this is not the aim of this article</strong>.</p><blockquote>New to trading? Try <a href="https://medium.com/coinmonks/crypto-trading-bot-c2ffce8acb2a">crypto trading bots</a> or <a href="https://medium.com/coinmonks/top-10-crypto-copy-trading-platforms-for-beginners-d0c37c7d698c">copy trading</a> on <a href="https://medium.com/coinmonks/crypto-exchange-dd2f9d6f3769">best crypto exchanges</a></blockquote><p>If you wish to learn this, here’s the code:</p><pre> <br>    bool isSameTree(TreeNode* p, TreeNode* q) {<br>        if(p == NULL || q == NULL) return (p == q);<br>        if(p-&gt;val != q-&gt;val) return false;<br>        <br>        return (isSameTree(p-&gt;left, q-&gt;left) &amp;&amp; <br>                isSameTree(p-&gt;right, q-&gt;right));<br>    }<br><br>    bool isSubtree(TreeNode* root, TreeNode* subRoot) {<br>        if(isSameTree(root, subRoot)) <br>            return true;<br>        if(! root) <br>            return false;<br>        <br>        return (isSubtree(root-&gt;left, subRoot) ||<br>                isSubtree(root-&gt;right, subRoot));<br>    }</pre><h3>⁕ The approach which teaches the concept used in BlockChain 💙</h3><p>Drumrolls 🥁🥁🥁</p><p>The concept we will be using here is <strong>Merkle Trees.</strong></p><h4>⁕ Diving deeper into the concept of Merkle Tree</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uaxTYcLlLAfyDG_r.png" /><figcaption>image credits: brilliant.org</figcaption></figure><ul><li>Merkle tree or hash tree is a tree structure in which <strong>leaf node</strong> contains the <strong>cryptographic hash</strong> of the block of data and <strong>non-leaf node</strong> contains <strong>cryptographic hash</strong> of its <strong>children</strong>.</li><li>In <strong>Bitcoin</strong> and other <strong>cryptocurrencies</strong>, a Merkle tree database is used to securely split the block’s data and ensure that it is not lost, damaged, or altered, <strong>basically to encrypt data more securely</strong>.</li><li>Each and every node on the network would have been required to maintain a complete copy of all the transactions that has ever taken place on the blockchain if Merkle trees were not existing!!!</li><li>Every node would have had to compare each entry line by line when verifying a transaction to ensure that its records exactly match the network records and this would have required enormous amount of <strong>computational power!!</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*O1b_FEtX1GQDIw5e.png" /><figcaption>image credits: simplilearn.com</figcaption></figure><blockquote>Now that we have known basics of Merkle tree, that we can identify all the transactions of the child nodes as well from the hash of root of merkle tree, let us use the same concept in the Leetcode problem!</blockquote><h4>⁕ Solving leetcode problem with merkle trees:</h4><ul><li>So, for each node of the tree we create merkle which is hash of its children or subtree.</li><li>In blockchain, generally hash <strong>SHA256</strong> is used which is a <strong>cryptographic</strong> hash. Checkout more about it <a href="https://www.educative.io/answers/how-is-sha-256-used-in-blockchain-and-why">here</a>.</li><li>It is the concatenation of<strong> merkle of left subtree + root’s value + merkle of right subtree!</strong></li><li>Once we have formed merkle of every root, we can simply traverse and <strong>check if the merkle of root of tree is matching the merkle of root of subtree.</strong></li><li>This is the python code from <a href="https://leetcode.com/problems/subtree-of-another-tree/solutions/102741/python-straightforward-with-explanation-o-st-and-o-s-t-approaches/?q=merkle&amp;orderBy=most_relevant">discuss tab</a>, implemented by importing sha256.</li></ul><pre>def isSubtree(self, s, t):<br>    from hashlib import sha256<br>    def hash_(x):<br>        S = sha256()<br>        S.update(x)<br>        return S.hexdigest()<br>        <br>    def merkle(node):<br>        if not node:<br>            return &#39;#&#39;<br>        m_left = merkle(node.left)<br>        m_right = merkle(node.right)<br>        node.merkle = hash_(m_left + str(node.val) + m_right)<br>        return node.merkle<br>        <br>    merkle(s)<br>    merkle(t)<br>    def dfs(node):<br>        if not node:<br>            return False<br>        return (node.merkle == t.merkle or <br>                dfs(node.left) or dfs(node.right))<br>                    <br>    return dfs(s)</pre><h3>⁕ References:</h3><ol><li><a href="https://leetcode.com/problems/subtree-of-another-tree/solutions/102741/python-straightforward-with-explanation-o-st-and-o-s-t-approaches/?q=merkle&amp;orderBy=most_relevant">https://leetcode.com/problems/subtree-of-another-tree/solutions/102741/python-straightforward-with-explanation-o-st-and-o-s-t-approaches/?q=merkle&amp;orderBy=most_relevant</a></li><li><a href="https://brilliant.org/wiki/merkle-tree/">https://brilliant.org/wiki/merkle-tree/</a></li><li>Gaurav sen’s video: <a href="https://www.youtube.com/watch?v=qHMLy5JjbjQ">https://www.youtube.com/watch?v=qHMLy5JjbjQ</a></li><li><a href="https://www.simplilearn.com/tutorials/blockchain-tutorial/merkle-tree-in-blockchain">https://www.simplilearn.com/tutorials/blockchain-tutorial/merkle-tree-in-blockchain</a></li><li><a href="https://www.educative.io/answers/how-is-sha-256-used-in-blockchain-and-why">https://www.educative.io/answers/how-is-sha-256-used-in-blockchain-and-why</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d985c2ad66f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coinmonks/solving-a-leetcode-problem-with-blockchain-concept-8d985c2ad66f">Solving a LeetCode problem with Blockchain concept 😎</a> was originally published in <a href="https://medium.com/coinmonks">Coinmonks</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Referral: the catalyst to get interviews]]></title>
            <link>https://drishty-ganatra66.medium.com/referral-the-catalyst-to-get-interviews-8a9d029686cc?source=rss-98efbe8afdc7------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a9d029686cc</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[referrals]]></category>
            <dc:creator><![CDATA[Drishty Ganatra]]></dc:creator>
            <pubDate>Sun, 18 Dec 2022 11:51:06 GMT</pubDate>
            <atom:updated>2022-12-18T11:51:06.253Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey! I am Drishty Ganatra a pre-final year student. I often used to see people around me who were technically sound and applied for internships but didn’t get shortlisted for the interviews.</p><blockquote><em>No doubt, resume, experience, skill-set and other things play the major role but these are reactants😉! Referral acts as catalyst to get the interviews, I believe.</em></blockquote><p>So here’s a structured guide on how to apply for a referral along with the <strong><em>template</em></strong> at the end 📝.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FfTI9mBoWLef8k%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FfTI9mBoWLef8k%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FfTI9mBoWLef8k%2Fgiphy.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="259" frameborder="0" scrolling="no"><a href="https://medium.com/media/0fd00dc1cff0d860e6176b85bc2c5633/href">https://medium.com/media/0fd00dc1cff0d860e6176b85bc2c5633/href</a></iframe><h4><strong>* TABLE OF CONTENTS:</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dB7sAdwRwZ560h-XrrpJog.png" /></figure><h4>* What exactly is a referral?</h4><ul><li>Companies wish to find the best talent and so they ask for your resume, transcripts to know your skills, projects, achievements etc. Your resume basically passes through <strong>“<em>Are You Deserving Candidate </em></strong><em>👀</em><strong>?” Test</strong>.</li><li>But there may be<strong> thousands and thousands</strong> of candidates applying for a single role. The process of asking the employee of the company you are wishing to apply, to have a look at your resume and refer you in case they consider you a potential candidate is called a <strong>referral</strong>.</li><li>Now this is<strong> icing on the cake</strong>, because let’s suppose there were 10,000 candidates and 1,500 applied via referral than it shows that these 1,500 people have passed <strong>one more level </strong>of <strong><em>“Are You Deserving Candidate </em></strong>👀<strong><em>” Test</em></strong>!</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FwuOtkQMVrqdRS%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FwuOtkQMVrqdRS%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FwuOtkQMVrqdRS%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="271" frameborder="0" scrolling="no"><a href="https://medium.com/media/c15a191bf7acd635aff8b69ae81248f1/href">https://medium.com/media/c15a191bf7acd635aff8b69ae81248f1/href</a></iframe><h4>* What is the process of referral?</h4><ul><li>Once you ask for a referral and the referrer finds you a potential candidate, he/she will ask for few of your details <strong>to complete it from their side</strong>.</li><li>Now, generally <strong>you receive a special link to apply on specified mail address</strong> and therefore <strong>don’t submit application before applying a referral</strong>! Generally, in most of the companies, referral cannot be applied on submitted application.</li><li>In big companies, referrers also get a refer bonus if the candidate gets selected as potential candidates are hard to find!</li></ul><h4>* Whom to ask for a referral?</h4><ul><li>You can reachout to people over <strong>LinkedIn</strong>, but, you might <em>not be having that company employees</em> as your <em>connections</em>, or you might <em>not be getting replies </em>after asking for referral, or <em>your connection requests are not getting accepted</em>, or you’re confused whom to ask for referral? 🥴</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FX0QKGRNCxnwWs%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FX0QKGRNCxnwWs%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FX0QKGRNCxnwWs%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="290" frameborder="0" scrolling="no"><a href="https://medium.com/media/5e39ce3c5670480a0c6d1098768f5238/href">https://medium.com/media/5e39ce3c5670480a0c6d1098768f5238/href</a></iframe><ul><li>Try <strong>not to ask influencers</strong> as they might be helpful but they receive tons of requests so there are high chances of you message getting neglected.</li><li>It’s my belief that generally <strong>college alumni</strong> are slightly more eager to refer you and have slighter soft corner for the same. Try to reach out to them.</li></ul><ol><li>Search the company name and select “People”.</li><li>Now, you might not be having 1st degree connections with their employees, so in this case, prepare a short message and mention your aim as “seeking for referral” along with the resume in the invitation message you send. <strong>Don’t send connection request without a personalized note!</strong></li><li><strong>Filter</strong> out people on the basis of College, connection degree, etc</li><li>Starting sending proper message (template at the end of article!) to <strong>bunch of people.</strong></li><li>Now, in case multiple people reply and you already got a referral, you can write a polite message like this: <strong><em>“Thank you so much for spending time to consider my resume! That was so humble of you! But I just now got a referral.”</em></strong></li></ol><h4>* Referral template 💙</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FiavKpDrWkA8Io%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FiavKpDrWkA8Io%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FiavKpDrWkA8Io%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="217" frameborder="0" scrolling="no"><a href="https://medium.com/media/eb57b5117705142394443b13f0c5adf1/href">https://medium.com/media/eb57b5117705142394443b13f0c5adf1/href</a></iframe><blockquote><em>Greetings xyz! Hope you are doing well! I am , a </em>first/ sophomore/ pre-final/ final year <em>[</em>Branch<em>] Engineering student from [</em>College name<em>] college having [</em>cgpa(if good)<em>] CPI. I am interested in applying for [</em>Position name<em>], as the roles and responsiblities are inclining with my skills and interests.</em></blockquote><blockquote><em>Link: [</em>attach link<em>] and Job ID: [</em>attach Job ID<em>].</em></blockquote><blockquote><em>{</em>Short intro: ranks or ratings on codeforces/ codechef/ leetcode/ google competitions. or mentioning your best project aligned with the role, or statistics of your open-source contributions<em>}</em></blockquote><blockquote><em>Attaching my resume for better context: [</em>attach drive link of resume<em>]</em></blockquote><blockquote><em>If you consider me fit for this, will you be open for referral?</em></blockquote><blockquote><em>Thank you!</em></blockquote><p>Hope you liked this! 💙</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F9eM1SWnqjrc40%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F9eM1SWnqjrc40%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F9eM1SWnqjrc40%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/d39e38e89e628ef863ff9052a2db3ffa/href">https://medium.com/media/d39e38e89e628ef863ff9052a2db3ffa/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a9d029686cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One Stop for Process Synchronization- The heart of Operating System❤️]]></title>
            <link>https://drishty-ganatra66.medium.com/one-stop-for-process-synchronization-the-heart-of-operating-system-%EF%B8%8F-592fce551c54?source=rss-98efbe8afdc7------2</link>
            <guid isPermaLink="false">https://medium.com/p/592fce551c54</guid>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[semaphore]]></category>
            <category><![CDATA[process-synchronization]]></category>
            <category><![CDATA[mutex]]></category>
            <category><![CDATA[dining-philosophers]]></category>
            <dc:creator><![CDATA[Drishty Ganatra]]></dc:creator>
            <pubDate>Tue, 12 Jul 2022 17:38:31 GMT</pubDate>
            <atom:updated>2022-07-12T17:38:31.215Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome 😊! This article is the gist of almost all the topics of Process Synchronization, which is a super important topic of Operating System!</p><p>I hope this article found you the day before your OS exam or interviews😅.</p><h3>Table of Contents:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I1eM4JUF_79Kb_DIpJ4IwQ.png" /></figure><h4>1. INTRODUCTION:</h4><ul><li>Process synchronization is the way by which an operating system <strong>handles co-operating processes</strong> using <strong>shared resources</strong>.</li><li>It helps to <strong>maintain data consistency</strong> and take care that <strong>no two processes are using the same shared resource simultaneously</strong>.</li><li>There are various solutions like hardware solutions, mutex, lock, semaphores, etc to help in process synchronization.</li></ul><h4>2. SECTIONS OF PROGRAM:</h4><ul><li><strong>Entry section</strong>: the code before critical section which governs the entry of a process into the critical section.</li><li><strong>Critical section</strong>: the section of code which contains shared resources and only one process at a time should enter into critical section.</li><li><strong>Exit section</strong>: the section of code which marks the end of the critical section.</li><li><strong>Remainder section</strong>: the remaining part of code which is not categorized above.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JArJ3LybztGKpqfJI5gVXQ.png" /><figcaption>image credit: teachingbee.in</figcaption></figure><h4>3. RACE CONDITION:</h4><ul><li>The condition where <strong>more than one processes</strong> are <strong>trying to access and modify the shared resource </strong>and the <strong>outcome of the program depends on order of execution </strong>of the processes is called race condition.</li><li>This can lead to <strong>data inconsistency</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*yVP2SHANdXiC_UQKQt9JKg.png" /><figcaption>image credit: <a href="https://vickieli.dev/hacking/race-conditions/">https://vickieli.dev/hacking/race-conditions/</a></figcaption></figure><h4>4. CRITICAL SECTION:</h4><ul><li>It refers to the section of code which contains the shared resources.</li><li>This section should be accessed by only one process at a time to avoid the data inconsistency.</li></ul><p><strong><em>A. REQUIREMENTS FOR SOLUTION OF CRITICAL SECTION:</em></strong></p><ol><li><strong>Mutual Exclusion</strong>:<strong> only one process</strong> should be allowed to <strong>enter the critical section</strong> at a moment.</li><li><strong>Progress</strong>: if no process is inside the critical section and if the multiple processes want to access the critical section, then any one of them should be permitted to go inside the critical section. <strong>Decision on which process should go inside the critical section</strong>, <strong>should be taken by only those processes which are not executing in the remainder section</strong>.</li><li><strong>Bounded waiting</strong>: There should be a <strong>bound or a limit</strong> on the number of times a particular <strong>process can enter the critical section</strong>. It should <strong>not happen that the same process is taking up critical section every time</strong> resulting in starvation of other processes. In this case, other processes would have to wait for an <strong>infinite </strong>amount of time, this should not happen.</li><li><strong>Hardware portability:</strong></li></ol><p><strong><em>B. HARDWARE SOLUTIONS:</em></strong></p><p><strong><em>I. Test and Set Operation:</em></strong></p><ul><li>It uses a <strong>lock</strong> variable which determines the entry of the process into the critical section.</li><li>Mutual exclusion ✅</li><li>Progress ✅</li><li>Bounded waiting ❌</li><li>Hardware portability ❌</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*6Nz0cLvdELXFDzcp9YhI-A.png" /></figure><p><strong><em>II. Swap Algorithm:</em></strong></p><ul><li><strong><em>Swap function</em></strong> uses two Boolean variables lock and key.</li><li>Both lock and key variables are initialized <strong>false</strong>.</li><li>Swap algorithm is the same as lock and set algorithm<strong>. </strong>The Swap algorithm uses a temporary variable to set the lock to true when a process enters the critical section of the program.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*JeBftPz0VheuM7mNtEMU_A.png" /><figcaption>code credits: <a href="https://www.scaler.com/topics">https://www.scaler.com/topics</a></figcaption></figure><p><strong><em>III. Lock and Unlock Algorithm: (credits: </em></strong><a href="https://www.scaler.com/topics">https://www.scaler.com/topics</a><strong><em>)</em></strong></p><ul><li>It uses the <strong>Test and Set </strong>method to control the value of lock.</li><li>Unlock and lock algorithm uses a variable <strong>waiting[I]</strong> for each process I. Here i is a positive integer i.e. 1,2, 3,.. which corresponds to processes P1, P2, P3… and so on. waiting[i] checks if the process i is waiting or not to enter into the critical section.</li><li>All the processes are maintained in a <strong>ready queue</strong> before entering into the critical section. The processes are added to the queue with respect to their process number. The queue is the circular queue.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*zObZtaa-AMTDXk3_Q_F5sw.png" /><figcaption>code credits: <a href="https://www.scaler.com/topics">https://www.scaler.com/topics</a></figcaption></figure><p><strong><em>C. SOFTWARE APPROACHES:</em></strong></p><p><strong><em>I. Lock:</em></strong></p><ul><li>It is a <strong>shared variable</strong> which governs the entry of a process into the critical section.</li><li>Lock is set to <strong>0</strong> if there is <strong>no process</strong> in the critical section and <strong>1</strong> if there is a <strong>process in the critical section</strong>.</li><li>mutual exclusion ❌ (if preemption occurs, ambiguity in the value of lock variable arises)</li><li><strong>Ambiguities </strong>arise if the process is <strong>preempted right after the execution of while loop condition</strong>. This can be rectified using test and set operation, which tests the lock value and sets it in one go.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*cDpVftw1UDp0pGHxfcyA8g.png" /></figure><p><strong><em>II. Strict Alternation:</em></strong></p><ul><li>For two processes</li><li>Turn variable</li><li>Mutual exclusion ✅</li><li><strong>Progress </strong>❌ (if Pi doesn’t want to enter critical section, Pj gets blocked for infinite time)</li><li>Bounded waiting ✅</li><li>Hardware portability ✅</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*SDXEdd7QaXohmW5RosZiiA.png" /></figure><p><strong><em>III. Mutex:</em></strong></p><ul><li>Locking mechanism</li><li>Only one thread at a time can access the resource locked by mutex</li><li>The process that locks the mutex, must be the one who unlocks it</li><li>0 means unlocked and 1 means locked</li><li>If the mutex is locked, process is busy waited until mutex is unlocked</li><li>It is an object</li><li>Mutual exclusion ✅</li><li>Bounded waiting ❌</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*jzvhRoMgBj_QMGbs4BAuKQ.png" /></figure><p><strong><em>IV. Semaphore:</em></strong></p><ul><li>Semaphore is an <strong>integer variable</strong> and this method uses <strong>signaling mechanism</strong> to solve critical section problem.</li><li>It is used to achieve mutual exclusion.</li><li>It uses atomic operations: <strong>wait () and signal ()</strong> functions which are basically requiring system calls.</li><li>Semaphore denotes the <strong>amount of some resource available</strong>.</li><li>Initial value of semaphore generally denotes number of resources available at initial level.</li><li><strong><em>wait () = P () = down () = entry section code</em></strong> &amp; signal (<strong><em>) = V () = up () = exit section code</em></strong></li><li>When the semaphore value does not permit a process to enter a critical section, it will be<strong> suspended</strong>. If any process in the critical section comes out and executes the exit section code or the <strong>signal ()</strong> function, a process from the <strong>suspended list</strong> will be<strong> woken up</strong> and will be brought to <strong>ready state.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*xtFv1HpfaN3AhDg5rg7TWA.png" /></figure><p><strong><em>a. Disadvantages:</em></strong></p><ul><li><strong><em>Priority inversion</em></strong> where low priority processes may access the critical section first and high priority processes later.</li><li>Semaphores are complicated so the wait and signal operations must be implemented in the correct order to prevent <strong><em>deadlocks.</em></strong></li></ul><p><strong><em>b. Binary Semaphore:</em></strong></p><ul><li>It uses only two <strong>integer values </strong>0 and 1 and provides mutual exclusion.</li><li>Semaphore is 1 means the process can proceed to critical section and if it is 0 then the process cannot proceed to critical section.</li><li>When the process is using the critical section, we change the semaphore value to 0.</li></ul><p><strong><em>c. Counting Semaphore:</em></strong></p><ul><li>In counting semaphores, the value of semaphore <strong>denotes the number of available resources that the processes can access</strong>.</li><li>Let’s say a shared resource has <strong>4 instances</strong>, so initially <strong>semaphore = 4</strong> now as the processes enter into critical section, the value of semaphore decreases and once the process comes out of critical section and runs the signal call, the value of semaphore increments.</li></ul><p><strong><em>V. Peterson’s Solution:</em></strong></p><ul><li>For two processes only</li><li>Software based solution implemented in user mode</li><li>Solves the problem of critical section</li><li>Mutual exclusion✅</li><li>Progress ✅</li><li>Bounded waiting ✅</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*OFTW_AXPZeBOnTlvONmQjg.png" /></figure><h4><strong><em>5. CLASSICAL IPC (INTER-PROCESS COMMUNICATION) PROBLEMS:</em></strong></h4><p><strong><em>A. PRODUCER-CONSUMER/ BOUNDED BUFFER PROBLEM:</em></strong></p><ul><li>Multi process synchronization problem, try to achieve synchronization between more than one processes.</li><li>Producer produces the items and consumer consumes the items</li><li>There is a memory buffer shared between consumer and producer which is of fixed size</li></ul><blockquote>Conditions:</blockquote><blockquote>Producer should produce data only if the buffer is not full</blockquote><blockquote>Consumer should consume data only if buffer is not empty</blockquote><blockquote>Producer and consumer should not access shared memory buffer simultaneously</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*3N6cKtNN4cm6ahXEg_eFog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/0*ljvwWi5FDcMqpaDL" /></figure><ul><li>Problem with above code:</li></ul><blockquote>If after inserting an element into buffer, while executing those three lines of count, let’s say that after line 2 of count, the process got preempted.</blockquote><blockquote>In this case value in register was updated but the count stayed as it is and didn’t get updated due to context switch.</blockquote><blockquote>As the context switch occurs, it now goes through consumer’s code and let’s say one of the elements was removed there, and count is updated.</blockquote><blockquote>Count shows current occupied spaces in the buffer, but in this case, it will be showing one lesser number since the context switch has occurred.</blockquote><blockquote>To resolve this ambiguity we using semaphores, monitors etc</blockquote><p><strong><em>SOLUTION TO PRODUCER-CONSUMER PROBLEM USING SEMAPHORES:</em></strong></p><ul><li><strong><em>empty</em></strong>: counting semaphore which keeps track of empty slots in buffer: empty = n</li><li><strong><em>full:</em></strong> is counting semaphore which keeps track of filled slots in buffer: full = 0</li><li><strong><em>S</em></strong>: binary semaphore which is used to provide mutual exclusion among producer and consumer processes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*Hu2RwFDfEhA0T7UKg4rMJg.png" /></figure><p><strong><em>B. DINING PHILOSOPHER PROBLEM:</em></strong></p><ul><li>Five philosophers seated on a circular table with 5 forks. food kept at the center</li><li>Philosophers take left fork then take right fork and then eat.</li><li>After completion, replace the forks.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*mzmGyHk_ryrZd1edDMPEEQ.png" /></figure><p>Problem with above code:</p><blockquote>If p0 takes left fork and gets preempted and meanwhile p1 takes left fork and right fork and eats: this is basically <strong><em>race condition.</em></strong></blockquote><blockquote>To overcome this, we use array of binary semaphores</blockquote><p>Deadlock problem:</p><ul><li>if all the philosophers get hungry at the same time and if p0 picks f0 and gets preempted, p1 picks f1 and gets preempted, likewise p4 picks f4 and gets preempted, this would result in the value of all semaphores to 0 and hence there will be a deadlock.</li><li>To avoid this, the last philosopher should always pick up the fork in the alternate order i.e., right fork first followed by left fork.</li><li>A deadlock-free solution does not always imply starvation-free solution.</li></ul><p><strong><em>C. READER-WRITER PROBLEM:</em></strong></p><ul><li>There are two types of processes that need access to shared resources such as file or database. These are read and write processes.</li><li>R-W: problem</li><li>W-R: problem</li><li>W-W: problem</li><li>R-R: NO problem</li><li>Any number of readers can read the data simultaneously</li><li>If a writer wants to write to the resource, it must wait until there are no readers currently accessing that resource.</li><li>int reader_count, semaphore m, semaphore db</li></ul><p><strong><em>SOLUTION TO READER-WRITER PROBLEM:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*JPzBUqw3i6Llk2UPp6mDmg.png" /></figure><h3>6. MONITORS:</h3><h4>Introduction:</h4><ul><li>Provides <strong>mutual exclusion</strong></li><li>Offer <strong>high level synchronization</strong></li><li>It is an <strong>object</strong> that contains both <strong>data and procedures</strong> needed to perform allocation of shared resources.</li><li>It is a <strong>programming language construct</strong></li><li>Implemented in programming language like java, C++, pascal etc</li><li>Only one process can be active within the monitor at a time</li><li><strong>Monitor’s variables are only accessible to process inside monitor. </strong>However<strong>,</strong> <strong>processes outside can call monitor’s procedures.</strong></li><li>When a process calls the monitor’s procedure, the first few instructions of the procedure will check if there is a process inside the monitor.</li><li>If there is no process inside, the current process enters the monitor</li><li>if there is a process inside the monitor then the current process is <strong>suspended until the previous process comes out of the monitor</strong></li><li>Two operations are performed on condition variables in monitors: wait () and signal ()</li><li><strong>wait ()</strong>: process performing wait operation on any condition variable is suspended. These suspended processes are <strong>placed in the block queue of the condition variable</strong>.</li><li><strong>signal ()</strong>: whenever a process calls signal operation, a process from <strong>suspended list is given a chance to enter.</strong></li></ul><h4>* Producer-consumer/bounded buffer solution using monitors:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*j__hV9MHpbxEquvNgttYzw.png" /></figure><h4>* Reader-Writer Solution using Monitors:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*txxVyv1Te3O9BW_ctlpzNg.png" /></figure><h4>* Dining Philosopher Solution using Monitors:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*9J1AmoEyz3D0lKYpaFcVlg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*eM6WEUoRzNWjx5FN2LWvwQ.jpeg" /></figure><p>Jal Lijiye, Thak gaye honge process synchronization pdhte pdhte!😅</p><p>I know it was super long, but I hope it helped!💙</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=592fce551c54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Journey Of Signing in as a Google DSC Lead✨]]></title>
            <link>https://drishty-ganatra66.medium.com/journey-of-signing-in-as-a-google-dsc-lead-e08c7b899213?source=rss-98efbe8afdc7------2</link>
            <guid isPermaLink="false">https://medium.com/p/e08c7b899213</guid>
            <category><![CDATA[google-developer-group]]></category>
            <category><![CDATA[gdsc]]></category>
            <category><![CDATA[google-developers-group]]></category>
            <dc:creator><![CDATA[Drishty Ganatra]]></dc:creator>
            <pubDate>Tue, 12 Jul 2022 11:38:18 GMT</pubDate>
            <atom:updated>2022-07-12T12:28:22.679Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j1FiK1VpxWFoId-REFAm3A.png" /></figure><p>Welcome reader😊!</p><p>I am <a href="https://www.linkedin.com/in/drishty-ganatra-ba07bb204/">Drishty Ganatra</a>, a Computer Engineering student at <a href="https://www.vgecg.ac.in/">Vishwakarma Government Engineering College</a>, just about to step into my pre-final year!</p><p>Here’s the selection mail for GDSC lead 2022–23! 😍</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KTQLI8C3-OiV_HYbZwknJg.png" /><figcaption>Received on 12th July, 2022</figcaption></figure><h3><strong>Table Of Contents:</strong></h3><ul><li>What is Google Developer Students’ Club?</li><li>Application Process</li><li>Tips for Application</li><li>Interview experience and tips</li><li>My video for GDSC!</li></ul><h4>What is Google Developer Students’ Club?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*TB8gu_I8y26HhKsgYa084w.png" /><figcaption>Checkout more from: <a href="https://www.youtube.com/watch?v=iohCC0OPocM&amp;list=PLOU2XLYxmsIL5MoZ5LrrxfVk3V04evsMm">https://www.youtube.com/watch?v=iohCC0OPocM&amp;list=PLOU2XLYxmsIL5MoZ5LrrxfVk3V04evsMm</a></figcaption></figure><blockquote>Google Developer Student Clubs (GDSC) are community groups for college and university students interested in <strong>Google developer technologies</strong>. Students from all undergraduate or graduate programs with an interest in growing as a developer are welcome. By joining a GDSC, students grow their knowledge in a peer-to-peer learning environment and build solutions for local businesses and their community.</blockquote><h4>Application Process:</h4><ul><li>Every year the applications open around in the month of <strong>March, </strong>you can apply<strong> </strong><a href="https://developers.google.com/community/gdsc/leads"><strong>here</strong></a><strong>.</strong></li><li>Deadlines vary according to regions. Following is a snapshot of deadlines for different regions.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*K5TtNDHtvPl2TyKPuKorGA.png" /></figure><ul><li>Application process consists of <strong>two community questions</strong> as follows and a <strong>90 second video</strong> to show why you are the right person to be a GDSC Leader at your Institution:</li></ul><blockquote><strong><em>What is your motivation to run a Google Developer Student Club at your Institution?</em></strong></blockquote><blockquote><strong><em>What is your experience in leading a project or a team?</em></strong></blockquote><h4>Tips for Application:</h4><ul><li>Former <strong>GDSC leads</strong> can <strong>nominate</strong>. Don’t forget to reach out to one of them and <strong>get the nomination code</strong>! Though this is <strong>not at all necessary</strong> but just one extra effort! 😌</li><li>Try to get your answers <strong>reviewed</strong> by previous GDSC Leads!</li><li>Checkout <strong>video applications</strong> of GDSC Leads from <strong>YouTube</strong>, <strong>take</strong> <strong>inspiration</strong> from the same and <strong>add your own unique essence</strong> to it! Checkout my <a href="https://youtu.be/D6VkDIqUjb4"><strong>video</strong></a>.</li><li>Keep your <strong>social accounts updated</strong>! (LinkedIn, GitHub, etc)</li><li>Portray your <strong>love for community</strong> through your answers!</li></ul><h4>Interview experience and tips:</h4><p>So, my interview lasted for around <strong>25 mins</strong>.</p><p>The questions were revolving around the <strong>vision of GDSC</strong> and <strong>how you as an individual can bring up the change in the community</strong>.</p><p>Prior the interview, go through what GDSC actually is, its vision, etc.</p><p><strong>Here’s the gist of questions:</strong> (cannot mention exact questions, but preparing these answers will definitely prepare you for the interview)</p><p>1. What are your <strong>technical strengths</strong>?</p><p>2. What is GDSC according to you. Explain the <strong>vision of GDSC</strong>.</p><p>3. <strong>Details about the projects</strong>, what is it all about, technologies used, your contribution.</p><p>4. If you mention technical strengths and languages, you can expect basic questions around them.</p><p>5. Any <strong>leadership experience</strong>.</p><p>6. Your <strong>plans for GDSC in the coming year</strong>.</p><p>7. Any <strong>internship experience</strong> or planning to do one?</p><p>8. Any <strong>bad experience working in a team</strong>.</p><p>9. How will you <strong>tackle the situation of difference of opinions among your teammate</strong>s?</p><p>10. Why should we select you as a lead?</p><p>11. Why do you want to be a GDSC lead?</p><h4>My video for GDSC! ❤️</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FD6VkDIqUjb4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DD6VkDIqUjb4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FD6VkDIqUjb4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8ecbec5bef19b20af4d88cf8a13651d6/href">https://medium.com/media/8ecbec5bef19b20af4d88cf8a13651d6/href</a></iframe><p>Super excited to start the new journey ahead🥳</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e08c7b899213" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>