<?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 THEBUG on Medium]]></title>
        <description><![CDATA[Stories by THEBUG on Medium]]></description>
        <link>https://medium.com/@thebugger?source=rss-c730dc66fac8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*EX2gnIzsfRb4_YmPev9NOg.png</url>
            <title>Stories by THEBUG on Medium</title>
            <link>https://medium.com/@thebugger?source=rss-c730dc66fac8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 17:20:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thebugger/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[E5-Step Red Spinach (Sag) Recipe]]></title>
            <link>https://medium.com/cuminfoods/e5-step-red-spinach-sag-recipe-6c5ec6382979?source=rss-c730dc66fac8------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c5ec6382979</guid>
            <category><![CDATA[india]]></category>
            <category><![CDATA[recipe]]></category>
            <category><![CDATA[food]]></category>
            <category><![CDATA[cooking]]></category>
            <category><![CDATA[indian]]></category>
            <dc:creator><![CDATA[THEBUG]]></dc:creator>
            <pubDate>Mon, 20 Jan 2025 18:22:50 GMT</pubDate>
            <atom:updated>2025-01-20T18:22:50.897Z</atom:updated>
            <content:encoded><![CDATA[<h3>Easy 5-Step Red Spinach (Sag) Recipe</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DjbhRH7HmdVjGDVRGeAxuw.png" /></figure><p><strong>Red Spinach</strong>, or <strong>Laal Saag</strong>, is a beloved leafy vegetable in Bihar, known as a “Holi vegetable” because it’s commonly prepared during festivals and wedding events. Its vibrant red color and rich nutrient content make it a staple in the local diet.</p><p>Packed with Vitamin A, C, and K, red spinach supports immune function, blood clotting, eye health, and bone strength. Let’s dive into this simple and nutritious recipe.</p><h3>Ingredients</h3><ul><li><strong>Red Spinach (Laal Saag)</strong>: 250 grams</li><li><strong>Dry Red Chili</strong>: 1</li><li><strong>Cumin seeds</strong>: 1 teaspoon</li><li><strong>Turmeric powder</strong>: 1/4 teaspoon</li><li><strong>Garlic paste</strong>: 1 tablespoon</li><li><strong>Salt</strong>: To taste</li><li><strong>Mustard oil</strong>: 1/4 cup</li></ul><h3>How to Make Red Spinach (Sag)</h3><ol><li><strong>Wash the Red Spinach</strong></li></ol><ul><li>Rinse the red spinach 3–4 times in fresh water to remove dirt and impurities.</li></ul><p><strong>2. Chop and Boil</strong>:</p><ul><li>Finely chop the spinach.</li><li>Boil the chopped spinach in a pressure cooker, cooking until one whistle.</li></ul><p><strong>3. Prepare the Tadka (Tempering)</strong>:</p><ul><li>Heat mustard oil in a pan until it’s hot.</li><li>Add cumin seeds and dry red chili. Let them crackle.</li></ul><p><strong>4. Add Garlic and Turmeric</strong>:</p><ul><li>Stir in the garlic paste and sauté until golden and fragrant.</li><li>Add turmeric powder and mix well.</li></ul><p><strong>5. Cook the Spinach</strong>:</p><ul><li>Add the boiled spinach to the pan.</li><li>Season with salt and stir-fry the mixture until it releases oil.</li></ul><p><strong>6. Serve</strong>: Your flavorful Red Spinach (Laal Saag) is ready to serve. Pair it with steamed rice or roti for a wholesome and satisfying meal.</p><p><strong>Prep Images</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lkiVIz4mJZZ16HbVEBY6Gw.png" /><figcaption>Pressure cook Spinach with salt</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FI0cLKteN3qAf3el1_UTGA.png" /><figcaption>Wait until one whistle</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x3M4OnMjG5Z_D6PMQ2JKfA.png" /><figcaption>Roast Mustard oil, cumin, red dry chilies</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WDBhKedKgSiBEMlMmRemuQ.png" /><figcaption>Add Turmeric</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QxKXCVscCn9KlAHwDeU6YQ.png" /><figcaption>Add garlic and green peppers</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kxwIcVX63h0GrpHT8YRo8Q.png" /><figcaption>Fry</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R6uND0YIzHYY1Fd7HaQvPA.png" /><figcaption>Add Cooked Spinach</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AhLE6u3YboZIP6DrQEw6QA.png" /><figcaption>Fry it</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*39M6YyXB8LSjiJBZ32manw.png" /><figcaption>Cover and Cook</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zACjFnYLdo9_4fdMHcp5HA.png" /><figcaption>Ready to be Served!!</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c5ec6382979" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cuminfoods/e5-step-red-spinach-sag-recipe-6c5ec6382979">E5-Step Red Spinach (Sag) Recipe</a> was originally published in <a href="https://medium.com/cuminfoods">CuminFoods</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[6-Step Pea Curry (Matar Ghughani)]]></title>
            <link>https://medium.com/cuminfoods/easy-5-step-bihari-baingan-aloo-chokha-df6a466cde7e?source=rss-c730dc66fac8------2</link>
            <guid isPermaLink="false">https://medium.com/p/df6a466cde7e</guid>
            <category><![CDATA[food]]></category>
            <category><![CDATA[indian]]></category>
            <category><![CDATA[india]]></category>
            <category><![CDATA[cooking]]></category>
            <category><![CDATA[recipe]]></category>
            <dc:creator><![CDATA[THEBUG]]></dc:creator>
            <pubDate>Mon, 20 Jan 2025 17:59:19 GMT</pubDate>
            <atom:updated>2025-01-20T18:12:40.666Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fKrJ-nBmlaks7RJHQRBiMA.png" /><figcaption>Pea Curry (Matar Ghughani)</figcaption></figure><p><strong>Matar Ghughani</strong> is a flavorful and aromatic dish from North India, loved for its warming spices and hearty texture. This recipe is not only delicious but also great for digestion and overall health. Pair it with steamed rice, puri, or paratha for a comforting meal.</p><h3>Ingredients</h3><h4>Main Ingredients</h4><ul><li><strong>Green peas</strong>: 1 cup (fresh or frozen)</li><li><strong>Onion</strong>: 1 cup, finely chopped</li><li><strong>Garlic</strong>: 1 tablespoon, crushed</li><li><strong>Ginger</strong>: 1/2 tablespoon, crushed</li><li><strong>Tomato</strong>: 1 medium, finely chopped</li><li><strong>Turmeric powder</strong>: 1/4 teaspoon</li><li><strong>Meat masala</strong>: 1 tablespoon</li><li><strong>Garam masala</strong>: 1/4 teaspoon</li><li><strong>Kashmiri red chili powder</strong>: 1/2 teaspoon</li><li><strong>Salt</strong>: To taste</li></ul><h4>For Tempering (Tadka)</h4><ul><li><strong>Cumin seeds</strong>: 1/2 teaspoon</li><li><strong>Green cardamom</strong>: 1</li><li><strong>Black cardamom</strong>: 1</li><li><strong>Dry red chili</strong>: 1</li><li><strong>Black peppercorns</strong>: 6–7</li><li><strong>Cloves</strong>: 2</li><li><strong>Mustard oil</strong>: 1 cup</li></ul><h3><strong>Instructions</strong></h3><h3>How to Make Matar Ghughani</h3><ol><li><strong>Prepare the Tadka</strong>:</li></ol><ul><li><em>Heat mustard oil in a pressure cooker until it reaches its smoking point. Reduce the heat.</em></li><li><em>Add cumin seeds, green cardamom, black cardamom, dry red chili, black peppercorns, and cloves. Sauté until the spices release their aroma.</em></li></ul><p><strong>2. Add Garlic and Ginger</strong>:</p><ul><li><em>Stir in the crushed garlic and ginger. Sauté for 1–2 minutes until fragrant.</em></li></ul><p><strong>3. Cook the Onions</strong>:</p><ul><li><em>Add the chopped onions and cook until golden and translucent.</em></li></ul><p><strong>4. Add Tomatoes and Spices</strong>:</p><ul><li><em>Stir in the chopped tomatoes, turmeric powder, meat masala, garam masala, Kashmiri red chili powder, and salt. Mix well.</em></li><li><em>Add 1–2 tablespoons of water to prevent the spices from burning. Cover and cook until the tomatoes soften and the oil begins to separate.</em></li></ul><p><strong>5. Add the Peas</strong>:</p><ul><li><em>Stir in the green peas and mix thoroughly with the masala.</em></li></ul><p><strong>6. Pressure Cook</strong>:</p><ul><li><em>Add 1/4 cup of water to the mixture. Close the pressure cooker and cook for 1 whistle on medium heat.</em></li><li><em>Allow the pressure to release naturally. Open the lid and stir the curry.</em></li></ul><p><strong>7. Garnish and Serve</strong>:</p><ul><li><em>Garnish with fresh coriander leaves and serve hot with rice, puri, or paratha.</em></li></ul><h3><strong>Prep Images</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s2RHLaBwkgOpBI7tH5YWxA.png" /><figcaption>Green peas, Chopped tomato, Garlic, Ginger , Chopped onion</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o8qQ6gYCgc3GSORFafvHjw.png" /><figcaption>Chopped Tomato</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y9UinzswKMxqae_PKDzKHw.png" /><figcaption>Adding Mustard Oil, Black Pepper, Cloves, Cumin, Fried Chili Peppers, Black Cardamom, Green Cardamom, Cinnamon</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U_cCL0-v0kOHw5WLrKrYVQ.png" /><figcaption>Adding Onions and crushed Garlic</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cDNfTdfP_qqLsdxKk_asIw.png" /><figcaption>Add in the spices — Asafoetida (hing), Kashmiri red chilli powder, Turmeric, Meat masala</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jNq5Fw5YyAG1hMYITD1LPw.png" /><figcaption>Adding Chopped Tomatoes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2lSpHziC2S9QmrdH_yg7SQ.png" /><figcaption>Adding Peas</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_xzauVYJ2T_qALZXKTf7UA.png" /><figcaption>Garnished and Ready to Serve!!</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df6a466cde7e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cuminfoods/easy-5-step-bihari-baingan-aloo-chokha-df6a466cde7e">6-Step Pea Curry (Matar Ghughani)</a> was originally published in <a href="https://medium.com/cuminfoods">CuminFoods</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy 5–Step Tomato Chokha]]></title>
            <link>https://medium.com/cuminfoods/easy-5-step-tomato-chokha-f54557e98559?source=rss-c730dc66fac8------2</link>
            <guid isPermaLink="false">https://medium.com/p/f54557e98559</guid>
            <category><![CDATA[cooking-recipes]]></category>
            <category><![CDATA[india]]></category>
            <category><![CDATA[cook]]></category>
            <category><![CDATA[food]]></category>
            <category><![CDATA[indian]]></category>
            <dc:creator><![CDATA[THEBUG]]></dc:creator>
            <pubDate>Mon, 20 Jan 2025 17:45:33 GMT</pubDate>
            <atom:updated>2025-01-20T17:45:33.220Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z6m5DCrt7q15jAVCIXNcLg.png" /></figure><p><strong>Tamatar Chokha</strong> is a simple yet flavorful dish from Bihar and North India that highlights the earthy taste and tender texture of tomatoes. A staple in many Indian households, it is beloved for its ease of preparation, minimal ingredients, and delicious flavor.</p><p>This quick and easy dish pairs beautifully with flat buttered bread, paratha, or steamed rice and dal.</p><h3><strong>Ingredients</strong></h3><ul><li><strong>Garlic — </strong>3 cloves</li><li><strong>Ginger — </strong>1-inch piece, finely chopped</li><li><strong>Green chilies — </strong>2–3, roasted</li><li><strong>Onion —</strong> 1 medium, finely chopped</li><li><strong>Mustard oil —</strong> 1 tablespoon</li><li><strong>Salt —</strong> As per taste</li><li><strong>Fresh ripe tomatoes —</strong> 3–4</li></ul><h3><strong>Instructions</strong></h3><ol><li><strong>Roast the Ingredients</strong>: Roast the tomatoes, green chilies, and garlic on an open flame or grill until the skin is charred and the vegetables are soft. Peel off the charred skin.</li><li><strong>Mash the Ingredients</strong>: In a mixing bowl, mash the roasted tomatoes, green chilies, and garlic together until smooth.</li><li><strong>Add Fresh Ingredients</strong>: Mix in the finely chopped ginger and onion.</li><li><strong>Season</strong>: Add salt and mustard oil, and mix everything thoroughly to combine.</li><li><strong>Serve</strong>: Tamatar Chokha is ready! Serve with flatbread, paratha, or steamed rice and dal for a comforting meal.</li></ol><p>Enjoy this quick, easy, and incredibly flavorful dish — perfect for any meal of the day!</p><h3><strong>Prep Images</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aotXfdvKfGIH-4MwMrUk2w.png" /><figcaption>Roasting Green Chillies, Garlic and Tomato</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*004ljfwcHVAMrtgtV-95jQ.png" /><figcaption>Chopped onions, Roasted garlic, Roasted green chilies, Ginger, Mustard oil , Roasted tomato, Salt</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NNJMf8A4dnZcKhqcxbugVA.png" /><figcaption>Crushed Tomato and Crushed Garlic</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F331WyDLjCKZvMwWN9podg.png" /><figcaption>Adding Mustard Oil, Chopped Onions and Ginger</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hAMms1P5eeKkhQshRfn36g.png" /><figcaption>Dish is ready to be served!!</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f54557e98559" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cuminfoods/easy-5-step-tomato-chokha-f54557e98559">Easy 5–Step Tomato Chokha</a> was originally published in <a href="https://medium.com/cuminfoods">CuminFoods</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy 5-Step Bihari Aloo Bhujiya]]></title>
            <link>https://medium.com/cuminfoods/easy-5-step-bihari-aloo-bhujiya-dcf1acfadf8e?source=rss-c730dc66fac8------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcf1acfadf8e</guid>
            <category><![CDATA[cooking-recipes]]></category>
            <category><![CDATA[india]]></category>
            <category><![CDATA[indian]]></category>
            <category><![CDATA[cooking]]></category>
            <category><![CDATA[food]]></category>
            <dc:creator><![CDATA[THEBUG]]></dc:creator>
            <pubDate>Sun, 05 Jan 2025 01:22:50 GMT</pubDate>
            <atom:updated>2025-01-05T01:22:50.090Z</atom:updated>
            <content:encoded><![CDATA[<p>A quick and flavorful potato stir-fry that’s a staple in Bihari cuisine.</p><figure><img alt="Bihari Aloo Bhujiya" src="https://cdn-images-1.medium.com/max/1024/1*FTJCHHCE3NNnQubg_EBLDg.png" /><figcaption>Bihari Aloo Bhujiya</figcaption></figure><p><strong>Bihari Aloo Bhujiya</strong> is a simple yet delicious dish that showcases the vibrant flavors of Indian spices. With tender potatoes coated in a medley of aromatic spices, this dish is perfect as a side dish for rice, roti, or parathas. Cooked with mustard oil for an authentic earthy taste, this recipe is quick to prepare and irresistibly satisfying.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XimsgyqcrtSTsnqJhIC47w.png" /></figure><h3>Ingredients</h3><ul><li><strong>Potatoes (medium-sized, peeled and sliced)</strong> — 250 g</li><li><strong>Cumin seeds (jeera)</strong> — ¼ tablespoon</li><li><strong>Dry red chilies</strong> — 2</li><li><strong>Garlic and ginger paste</strong> — 1 tablespoon</li><li><strong>Turmeric powder</strong> — ½ tablespoon</li><li><strong>Salt</strong> — To taste</li><li><strong>Mustard oil</strong> — ¼ cup</li><li><strong>Cumin powder</strong> — ½ tablespoon</li><li><strong>Coriander powder</strong> — ½ tablespoon</li></ul><h3>Instructions</h3><ol><li><strong>Heat Oil</strong>: Heat a pan and add mustard oil. Allow it to heat until it reaches its smoking point, then reduce the flame.</li><li><strong>Temper Spices</strong>: Add cumin seeds and dry red chilies to the hot oil. Sauté until they crackle and release their aroma.</li><li><strong>Cook Potatoes</strong>: Add the sliced potatoes to the pan. Stir well and cook on low flame until they soften, stirring occasionally.</li><li><strong>Add Spices</strong>: Mix in the garlic and ginger paste, turmeric powder, cumin powder, coriander powder, and salt. Stir to coat the potatoes evenly with the spices.</li><li><strong>Cover and Simmer</strong>: Cover the pan and let the potatoes cook on low flame for 2–3 minutes until they are fully tender and the flavors meld.</li><li><strong>Garnish and Serve</strong>: Garnish with fresh coriander leaves and sliced chilies. Serve hot with rice or bread.</li></ol><h3>Tips</h3><ul><li>For added flavor, sprinkle a pinch of garam masala before serving.</li><li>Adjust the level of red chilies to suit your spice tolerance.</li><li>Use fresh mustard oil for the best taste and aroma.</li></ul><h3><strong>Prep Images</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q_ACxSLiALwic0_D-1PpWw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d8FhjGB-9Ic_HLjmA40GrQ.png" /><figcaption>Peeled Potatoes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ahJRN4Ea2bMuHNP9EEpfBQ.png" /><figcaption>Add cumin and dried red chillies to heated oil pan</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eKwfWz_4KiTpVpmpCIkmPg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mZ2HDIbMS5l17XAomktfew.png" /><figcaption>Add potatoes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8AuEoJN8kwBDF2lzSfckBA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3hp88fVEdN12-sr6R4Oxiw.png" /><figcaption>Prep garlic paste and add it in</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3X6l0ywM1GLicTQ0L4biZg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eETIj--GBMzOR3U6fUgjrw.png" /><figcaption>Mix in the spices, cover and simmer</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FfA19okjiP-NQd_TEoR-kA.png" /><figcaption>Bihari Aloo Bhujiya is ready to be served</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcf1acfadf8e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cuminfoods/easy-5-step-bihari-aloo-bhujiya-dcf1acfadf8e">Easy 5-Step Bihari Aloo Bhujiya</a> was originally published in <a href="https://medium.com/cuminfoods">CuminFoods</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy 5-Step Badam Kheer (Almond Rice Pudding)]]></title>
            <link>https://medium.com/cuminfoods/easy-5-step-badam-kheer-almond-rice-pudding-43cc547de223?source=rss-c730dc66fac8------2</link>
            <guid isPermaLink="false">https://medium.com/p/43cc547de223</guid>
            <category><![CDATA[indian]]></category>
            <category><![CDATA[food]]></category>
            <category><![CDATA[india]]></category>
            <category><![CDATA[cooking]]></category>
            <category><![CDATA[vegetarian]]></category>
            <dc:creator><![CDATA[THEBUG]]></dc:creator>
            <pubDate>Sun, 05 Jan 2025 01:01:40 GMT</pubDate>
            <atom:updated>2025-01-05T01:41:21.905Z</atom:updated>
            <content:encoded><![CDATA[<p>A rich and creamy dessert perfect for festive occasions or indulgent treats.</p><figure><img alt="Badam Kheer (Almond Rice Pudding)" src="https://cdn-images-1.medium.com/max/942/1*HaqDm5_N-Td6v4zzFPLLTg.jpeg" /><figcaption>Badam Kheer (Almond Rice Pudding)</figcaption></figure><p><strong>Badam Kheer</strong> is a decadent Indian dessert made with almonds, rice, and milk, simmered together to create a velvety, nutty pudding. Infused with the aromatic sweetness of cardamom and raisins, this dish is a celebration of flavor and tradition. Whether served warm or chilled, Badam Kheer is guaranteed to delight your taste buds and leave a lasting impression.</p><h4>Ingredients — Serves 2</h4><ul><li><strong>Full cream milk</strong> — 1 liter</li><li><strong>Almonds (soaked and finely crushed)</strong> — 1 cup</li><li><strong>Sugar</strong> — 1 cup</li><li><strong>Rice</strong> — ¼ cup</li><li><strong>Cardamom (powdered)</strong> — 4–5 pods</li><li><strong>Raisins</strong> — 20</li></ul><h4>Instructions</h4><ol><li><strong>Prepare Milk</strong>: Pour the full cream milk into a deep pan and bring it to a boil over medium heat. Let it simmer for 5 minutes.</li><li><strong>Add Rice</strong>: Add ¼ cup of rice to the boiling milk and stir continuously to prevent sticking. Cook on medium heat until the rice is fully cooked and soft.</li><li><strong>Incorporate Almonds</strong>: Once the rice is cooked, add the soaked and finely crushed almonds to the pan. Stir well to combine.</li><li><strong>Simmer the Kheer</strong>: Continue to cook on medium heat for another 10 minutes, stirring frequently, until the mixture thickens to a creamy consistency.</li><li><strong>Sweeten and Cool</strong>: Remove the pan from heat and let the kheer cool slightly. Add the sugar, powdered cardamom, and raisins, stirring to mix evenly.</li><li><strong>Serve</strong>: Serve warm or refrigerate for a chilled version. Garnish with additional almonds or raisins if desired.</li></ol><h4>Tips</h4><ul><li>For an even richer texture, add a splash of condensed milk or cream during the cooking process.</li><li>Blanch the almonds before soaking to make peeling easier.</li><li>Adjust sugar levels to suit your preference.</li></ul><h3><strong>Prep Images</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-5DN-merL_cxmuzngOYQ2g.png" /><figcaption>Cardmom</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wbyD6Fw8e-Ol3cKxYtl2ew.png" /><figcaption>1 Cup Sugar</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ry-VJUaP7k2kNb9BTxssUw.png" /><figcaption>1 Cup Almonds</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4JPaUOuJXhWgVSFhbcuVZw.png" /><figcaption>1/4 Cup Rice</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*05p00SYl_ejBtRCMu0OQsQ.png" /><figcaption>Boil Rice with Milk</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p5JP8Soz_PFHJTaWv74iRA.png" /><figcaption>Crushing Cardamom</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T33VAq2iJ-fIqPvU-SqV0w.png" /><figcaption>Add crushed almonds to the milk</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FIbIf9WAhn2DPSf6BP_A4g.png" /><figcaption>Add raisins</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cb4o0HDPBrR8M4z1OubJOA.png" /><figcaption>Add sugar</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*HaqDm5_N-Td6v4zzFPLLTg.jpeg" /><figcaption>Badam Kheer (Almond Rice Pudding) is ready to be served</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43cc547de223" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cuminfoods/easy-5-step-badam-kheer-almond-rice-pudding-43cc547de223">Easy 5-Step Badam Kheer (Almond Rice Pudding)</a> was originally published in <a href="https://medium.com/cuminfoods">CuminFoods</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy 4-Step Bihari Baingan (Eggplant) and Aloo (Potato) Chokha]]></title>
            <link>https://medium.com/cuminfoods/easy-4-step-bihari-baingan-eggplant-and-aloo-potato-chokha-d81da2c80d5d?source=rss-c730dc66fac8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d81da2c80d5d</guid>
            <category><![CDATA[food]]></category>
            <category><![CDATA[india]]></category>
            <category><![CDATA[indian]]></category>
            <category><![CDATA[cooking]]></category>
            <category><![CDATA[vegan]]></category>
            <dc:creator><![CDATA[THEBUG]]></dc:creator>
            <pubDate>Sun, 05 Jan 2025 00:38:19 GMT</pubDate>
            <atom:updated>2025-01-05T01:02:48.289Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dd0wNsdHhf5V0DrpOJrpSg.png" /><figcaption>Bihari Baingan (Eggplant) and Aloo (Potato) Chokha</figcaption></figure><p><strong>Bihari Bagan</strong> and Aloo Chokha is a beloved dish from the heart of Bihar, India. Simple yet flavorful, this dish combines smoky roasted eggplants and creamy potatoes with the zesty punch of mustard oil, chilies, and aromatic herbs. Perfect as a side dish or a wholesome meal when paired with rice or flatbread, this recipe celebrates the essence of rustic Indian cooking. Whether you’re looking for a comforting family dinner or a taste of authentic Bihari flavors, this chokha is sure to impress with its hearty texture and bold flavors.</p><h3>Ingredients</h3><ul><li><strong>Eggplants (medium-sized)</strong> — 2</li><li><strong>Potatoes (medium-sized)</strong> — 6</li><li><strong>Green chilies (chopped)</strong> — 4</li><li><strong>Garlic cloves (chopped)</strong> — 8</li><li><strong>Ginger (chopped)</strong> — 1 inch piece</li><li><strong>Coriander leaves (chopped)</strong> — 1 tablespoon</li><li><strong>Salt</strong> — 1 tablespoon</li><li><strong>Mustard oil</strong> — 1 tablespoon</li><li><strong>Water</strong> — ¼ cup</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SrPzDtkq8u5hXniMROXmKA.png" /></figure><h3>Instructions</h3><ul><li><strong>Boil and Prepare Potatoes</strong>: Boil the potatoes, peel them, and mash them until smooth.</li><li><strong>Roast Eggplants</strong>: Roast the eggplants on an open flame, stovetop, or in the oven until the skin is charred and the flesh is soft. Let them cool slightly, peel off the charred skin, and mash the pulp.</li><li><strong>Chop Ingredients</strong>: Finely chop the green chilies, garlic cloves, ginger, and coriander leaves.</li><li><strong>Mix Ingredients</strong>: In a large bowl, combine the mashed potatoes and eggplants. Add the chopped chilies, garlic, ginger, coriander leaves, salt, and mustard oil. Mix well.</li><li><strong>Adjust Consistency</strong>: Add ¼ cup water and mix to achieve the desired consistency.</li><li><strong>Garnish and Serve</strong>: Garnish with additional coriander leaves. Serve fresh and enjoy!</li></ul><h3>Tips</h3><ul><li>For an authentic smoky flavor, roast the eggplants directly over a flame.</li><li>Adjust the number of chilies to suit your spice preference.</li></ul><h3><strong>Prep Images</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5unmzxHW1uOdSgSeTlyUew.png" /><figcaption>Roasting Eggplant</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QIfKw8n4W_dsy5D2K4-dNQ.png" /><figcaption>Prepping to boil potatoes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CQue8xkH8xjCNO7c_Ii-Fg.png" /><figcaption>Mixing everything together</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JkW3uwZEH_TJm2fUj0Fppg.png" /><figcaption>Adding Mustard Oil</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NiDoIcv22zcVkHsPtsO1ig.png" /><figcaption>Baingan (Eggplant) and Aloo (Potato) Chokha (Ready to be served)</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d81da2c80d5d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cuminfoods/easy-4-step-bihari-baingan-eggplant-and-aloo-potato-chokha-d81da2c80d5d">Easy 4-Step Bihari Baingan (Eggplant) and Aloo (Potato) Chokha</a> was originally published in <a href="https://medium.com/cuminfoods">CuminFoods</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[15 minute — 4 Step Bhindi(Okra) Bhujiya]]></title>
            <link>https://medium.com/cuminfoods/15-minute-4-step-bhindi-okra-bhujiya-f3fb2f55b00e?source=rss-c730dc66fac8------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3fb2f55b00e</guid>
            <category><![CDATA[vegan]]></category>
            <category><![CDATA[food]]></category>
            <category><![CDATA[indian]]></category>
            <category><![CDATA[cooking]]></category>
            <category><![CDATA[india]]></category>
            <dc:creator><![CDATA[THEBUG]]></dc:creator>
            <pubDate>Tue, 24 Dec 2024 06:00:01 GMT</pubDate>
            <atom:updated>2024-12-24T06:10:54.463Z</atom:updated>
            <content:encoded><![CDATA[<h3>15 minute — Vegan 4 Step Bhindi(Okra) Bhujiya</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bIN7YJeM89hWjNkw.png" /><figcaption>Bhindi Bhujiya</figcaption></figure><p><strong>Bhindi Bhujiya, </strong>also known as Okra Bhujiya, is a traditional and simple North Indian dish that highlights the earthy flavor and tender texture of okra. This dish is a staple in many Indian households, thanks to its ease of preparation, minimal ingredients, and delicious taste.</p><p>It is quick and easy that pairs beautifully with flatbreads like roti and paratha or a bowl of steaming hot rice.</p><p>The recipe uses a handful of common pantry ingredients: fresh okra (also known as ladyfinger or bhindi), green chilies, cumin seeds, turmeric powder, and mustard oil (or olive oil for a healthier alternative). These simple ingredients come together to create a dish that’s packed with flavor and nutrition.</p><p>Okra is not just delicious but also highly nutritious. A native of Africa and biologically classified as a fruit, okra is rich in Vitamin K1 and Vitamin C, offering health benefits such as improved bone health and immune support. In Pakistan, okra is celebrated as the national vegetable, making Bhindi Bhujiya a dish with cultural significance.</p><p><strong><em>It’s naturally vegetarian and can easily be made vegan by using plant-based oil.</em></strong></p><p><strong>The process is straightforward:</strong> the okra is sautéed with spices until tender and coated in a golden hue of turmeric, making it flavorful and irresistible. Whether you’re a beginner cook or an experienced chef, this recipe is a must-try for a wholesome and satisfying meal.</p><p>So, let’s dive into making Bhindi Bhujiya, a dish that’s not just quick and easy but also incredibly Yam-my!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nDv0nZgqyNc0vl-v.png" /></figure><h3>Ingredients — Serves 2</h3><p>1 — Bhindi (okra) chopped — <strong>250 gram </strong><br>2 — Mustard oil or Olive oil — <strong>2 tsp</strong><br>3 — Cumin seeds — <strong>1/4tsp</strong><br>4 — Nigella — <strong>1/8 tsp</strong><br>5 — Carrom Seeds — <strong>1/8 tsp</strong><br>5 — Green chilies or Dry Red chili chopped — <strong>2 to 3 </strong><br>6 — Turmeric — <strong>1/4 tsp</strong><br>7 — Salt — <strong>according to taste</strong></p><h3>Instructions</h3><h4>Here’s a step-by-step guide to making Bhindi Bhujiya:</h4><p><strong>Step 1:</strong> Heat oil</p><ul><li>Add mustard oil or olive oil to a hot pan and wait until the oil is heated.</li></ul><p><strong>Step 2:</strong> Add spices</p><ul><li>Add chopped green chilies (or dry red chilies) and cumin seeds to the hot oil. Let them crackle to release their flavors.</li></ul><p><strong>Step 3:</strong> Cook the Bhindi</p><ul><li>Add the chopped Bhindi (okra) to the pan and fry it until it is cooked through. Stir occasionally to avoid sticking.</li></ul><p><strong>Step 4:</strong> Season the Bhindi</p><ul><li>Add turmeric powder and salt. Mix everything well and cover the pan. Let it cook for 2 to 3 minutes on low heat.</li></ul><p><strong><em>Step 5:</em></strong><em> Serve</em></p><ul><li><em>Your Bhindi Bhujiya is ready! Serve hot with roti, paratha, or rice.</em></li></ul><h3>Prep Images</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rPo9O3h4wjxnVK7y.jpeg" /><figcaption>Prepping Okra</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BAMLJzfjtcq5ZMZM.jpeg" /><figcaption>Chopping Okra</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rKarpSEab2Jj_Nen.jpeg" /><figcaption>Prepped Spices — Cumin seeds, Green chilies, Dry Red chili chopped, Turmeric, Salt</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*-Uug6oIcB9SUNWcr.jpeg" /><figcaption>Adding Spices to prepped pan</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*Dgxh74PbmRgZ0WBt.jpeg" /><figcaption>Adding Chopped Okra to the pan</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*uIcpqBtclPVvqx__.jpeg" /><figcaption>Adding Turmeric and Salt to pan</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XATV7wkYCqzGRwVh.png" /><figcaption>Bhindi Bhujiya (Ready to be served)</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3fb2f55b00e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cuminfoods/15-minute-4-step-bhindi-okra-bhujiya-f3fb2f55b00e">15 minute — 4 Step Bhindi(Okra) Bhujiya</a> was originally published in <a href="https://medium.com/cuminfoods">CuminFoods</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Product of Array Except Self]]></title>
            <link>https://medium.com/thebug/product-of-array-except-self-788b30d2e981?source=rss-c730dc66fac8------2</link>
            <guid isPermaLink="false">https://medium.com/p/788b30d2e981</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[leetcode]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[THEBUG]]></dc:creator>
            <pubDate>Tue, 15 Mar 2022 21:56:59 GMT</pubDate>
            <atom:updated>2022-03-15T21:56:59.706Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7yRJRGEpbN1218ZodyCWUg.png" /></figure><p>Another popular algorithm interview question, this question is the same as — Leetcode 238. Product of Array Except Self</p><p>The problem description usually says: <strong><em>For an integer array, return an answer where answer[i] is equal to the product of every other element except array[i] without using division.</em></strong></p><p>So, something like this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vq2xTDPiNCoBtTncu6eFQw.png" /></figure><p>ans[0] = array[1]*array[2]*array[3]</p><p>ans[1] = array[0]*array[2]*array[3]</p><p>ans[2] = array[0]*array[1]*array[3]</p><p>ans[3] = array[0]*array[1]*array[2]</p><h3><strong>Solution</strong></h3><h4>Brute Force O(n²)</h4><p>The brute force answer for this would use two nested loops and calculate the answer and would look something like —</p><pre>array = [1,2,3,4]<br>answer = []<br>for i in range(len(array)):<br>    totalProduct = 1</pre><pre>    for j in range(len(array))<br>        if i != j: totalProduct*=array[j]<br>    answer.append(totalProduct)<br>return answer</pre><p>We go through every combination of elements and multiply it, skipping the current element and adding to our answer array. In the end we can simply return the answer.</p><p>Our loops are running for n*n times making this a<strong> O(n²)</strong> solution, and we can do better than this —</p><h4>Optimal O(n)</h4><p>If you look hard enough — what we need to do is pretty simple — to find the answer[2] we need to multiply everything before and after answer[2] like explained above —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*dE9nusCwe_bUIz36wBJdMw.png" /></figure><p>So what if we do that and store it, if we create two arrays, one being a product array of all the elements to the left and one being a product array of all the elements to the right —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XwON36g-XsgnTY7CIXHImQ.png" /></figure><p>At any “i” in the right product array shown above has the product of everything to its right, and similarly, any “i” in the left product array shown above has the product of everything to its left —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WPjaf-oxuWXeB67dqhyhRw.png" /><figcaption>Right Prod Array</figcaption></figure><p>So now for any array[i] —</p><p>the answer[i] will be — <strong>leftProd[i-1]*rightProd[i+1]</strong></p><p>This is how we calculate the answer array optimally —</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%252873%252C145%252C255%252C1%2529%26t%3Dseti%26wt%3Dnone%26l%3Dapplication%252Fx-sh%26width%3D680%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D32px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D100px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D13px%26lh%3D133%2525%26si%3Dfalse%26es%3D4x%26wm%3Dfalse%26code%3Dclass%252520Solution%25253A%25250A%252520%252520%252520%252520def%252520productExceptSelf%2528self%25252C%252520nums%25253A%252520List%25255Bint%25255D%2529%252520-%25253E%252520List%25255Bint%25255D%25253A%25250A%252520%252520%252520%252520%252520%252520%252520%252520rightMul%25252C%252520leftMul%252520%25253D%2525201%25252C%2525201%25250A%252520%252520%252520%252520%252520%252520%252520%252520answer%252520%25253D%252520%25255B%25255D%25250A%252520%252520%252520%252520%252520%252520%252520%252520for%252520i%252520in%252520range%2528len%2528nums%2529%2529%25253A%25250A%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520leftMul%252A%25253Dnums%25255Bi%25255D%25250A%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520answer.append%2528leftMul%2529%25250A%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%25250A%252520%252520%252520%252520%252520%252520%252520%252520for%252520i%252520in%252520range%2528len%2528nums%2529-1%25252C-1%25252C-1%2529%25253A%25250A%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520if%252520i%25253E0%25253A%252520answer%25255Bi%25255D%252520%25253D%252520answer%25255Bi-1%25255D%252ArightMul%25250A%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520else%25253A%252520answer%25255Bi%25255D%252520%25253D%252520rightMul%252520%25250A%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520rightMul%252A%25253Dnums%25255Bi%25255D%25250A%252520%252520%252520%252520%252520%252520%252520%252520%25250A%252520%252520%252520%252520%252520%252520%252520%252520return%252520answer%25250A%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%25252873%25252C145%25252C255%25252C1%252529%26t%3Dseti%26wt%3Dnone%26l%3Dapplication%25252Fx-sh%26width%3D680%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D32px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D100px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D13px%26lh%3D133%252525%26si%3Dfalse%26es%3D4x%26wm%3Dfalse%26code%3Dclass%25252520Solution%2525253A%2525250A%25252520%25252520%25252520%25252520def%25252520productExceptSelf%252528self%2525252C%25252520nums%2525253A%25252520List%2525255Bint%2525255D%252529%25252520-%2525253E%25252520List%2525255Bint%2525255D%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520rightMul%2525252C%25252520leftMul%25252520%2525253D%252525201%2525252C%252525201%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520answer%25252520%2525253D%25252520%2525255B%2525255D%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520for%25252520i%25252520in%25252520range%252528len%252528nums%252529%252529%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520leftMul%25252A%2525253Dnums%2525255Bi%2525255D%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520answer.append%252528leftMul%252529%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520for%25252520i%25252520in%25252520range%252528len%252528nums%252529-1%2525252C-1%2525252C-1%252529%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520if%25252520i%2525253E0%2525253A%25252520answer%2525255Bi%2525255D%25252520%2525253D%25252520answer%2525255Bi-1%2525255D%25252ArightMul%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520else%2525253A%25252520answer%2525255Bi%2525255D%25252520%2525253D%25252520rightMul%25252520%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520rightMul%25252A%2525253Dnums%2525255Bi%2525255D%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520return%25252520answer%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8e596171f279efc100ddcea4bcd2287e/href">https://medium.com/media/8e596171f279efc100ddcea4bcd2287e/href</a></iframe><p>In the solution above, instead of using two arrays, one of left prod and one for right prod, only one array is being using, we are keeping track of one of the arrays on the fly using the rightMul variable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=788b30d2e981" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thebug/product-of-array-except-self-788b30d2e981">Product of Array Except Self</a> was originally published in <a href="https://medium.com/thebug">THEBUG</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Two Sum Using Python]]></title>
            <link>https://medium.com/thebug/two-sum-using-python-e2b2a46addc3?source=rss-c730dc66fac8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2b2a46addc3</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[THEBUG]]></dc:creator>
            <pubDate>Wed, 05 Jan 2022 01:50:02 GMT</pubDate>
            <atom:updated>2022-01-06T00:53:15.223Z</atom:updated>
            <content:encoded><![CDATA[<h3>Two Sum</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*shsCWXyupV54CVlTZ7-ucg.jpeg" /></figure><p>Today we discuss the infamous interview question — Two Sum - If you are prepping for an technical interview or just grinding leetcode or hackerrank or just trying to kill time casually browsing trough a CS book, you probably have stumbled upon this quesiton.</p><p>It usually is phrased something like —</p><p>Given an array of numbers and an target value, find out where the sum of the two numbers exist within the array.</p><p>At first glance, the question seems pretty easy, just go through the array and find out the two numbers. Right? Well, yes and no, if you are trying to crack a technical interview this answer might not get you the results you are trying to get. There is a much more efficient way of doing it within O(n) time. And that is what we will discuss in this article.</p><p>The logic behind this O(n) approach is that if you substract the target from an element from the array, the result is also within the array, you have your answer. Lets use an example —</p><p>[1,2,3,4,5] — Lets say we have this array, and the target we are trying to find is 6. We can see that 2 and 4 within the array and they add up to a 6. Using this logic, if we take the target — 6 and subtract it with 2, it leaves us with 4, and we know (using the dictionary) that 4 is at the 3rd index of the array.</p><p>First we define the dictionary, and populate it with the index number of each of the elements—</p><pre>dictionary = {}<br>for i in range(len(nums)):<br>    dictionary[nums[i]] = i</pre><p>Then we once again iterate over the list/array, subtract each number with the target and use .get() to see if the result of the subtraction exists within the dicitonary. Also, we need to make sure we arent using the same element twice to create the result — For instance, in case of this array — [1,2,3,4,5], you can use 3 twice to make a 6, but that is not what we want to do here, which is why we use the dictionary to check if the index of the subtraction result not the same as the index we are on using —</p><pre>i!=dictionary[target-nums[i]]</pre><p>And here is the full code —Enjoy!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%252874%252C144%252C226%252C1%2529%26t%3Dmaterial%26wt%3Dnone%26l%3Dpython%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DFira%2BCode%26fs%3D14px%26lh%3D152%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Ddef%252520twoSum%2528self%25252C%252520nums%25253A%252520List%25255Bint%25255D%25252C%252520target%25253A%252520int%2529%252520-%25253E%252520List%25255Bint%25255D%25253A%25250A%252520%252520%252520%252520%252520%252520%252520%252520dictionary%252520%25253D%252520%25257B%25257D%25250A%252520%252520%252520%252520%252520%252520%252520%252520%25250A%252520%252520%252520%252520%252520%252520%252520%252520for%252520i%252520in%252520range%2528len%2528nums%2529%2529%25253A%25250A%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520dictionary%25255Bnums%25255Bi%25255D%25255D%252520%25253D%252520i%25250A%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%25250A%252520%252520%252520%252520%252520%252520%252520%252520for%252520i%252520in%252520range%2528len%2528nums%2529%2529%25253A%25250A%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520if%252520dictionary.get%2528target%252520-%252520nums%25255Bi%25255D%2529%252520and%252520i%2521%25253Ddictionary%25255Btarget-nums%25255Bi%25255D%25255D%25253A%25250A%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520return%252520%25255Bi%25252Cdictionary%25255Btarget-nums%25255Bi%25255D%25255D%25255D%25250A%252520%252520%252520%252520%252520%252520%252520%252520&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%25252874%25252C144%25252C226%25252C1%252529%26t%3Dmaterial%26wt%3Dnone%26l%3Dpython%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DFira%2BCode%26fs%3D14px%26lh%3D152%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Ddef%25252520twoSum%252528self%2525252C%25252520nums%2525253A%25252520List%2525255Bint%2525255D%2525252C%25252520target%2525253A%25252520int%252529%25252520-%2525253E%25252520List%2525255Bint%2525255D%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520dictionary%25252520%2525253D%25252520%2525257B%2525257D%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520for%25252520i%25252520in%25252520range%252528len%252528nums%252529%252529%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520dictionary%2525255Bnums%2525255Bi%2525255D%2525255D%25252520%2525253D%25252520i%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520for%25252520i%25252520in%25252520range%252528len%252528nums%252529%252529%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520if%25252520dictionary.get%252528target%25252520-%25252520nums%2525255Bi%2525255D%252529%25252520and%25252520i%252521%2525253Ddictionary%2525255Btarget-nums%2525255Bi%2525255D%2525255D%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520return%25252520%2525255Bi%2525252Cdictionary%2525255Btarget-nums%2525255Bi%2525255D%2525255D%2525255D%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6e0e84d6133974bd017f8d06c2afca8c/href">https://medium.com/media/6e0e84d6133974bd017f8d06c2afca8c/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2b2a46addc3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thebug/two-sum-using-python-e2b2a46addc3">Two Sum Using Python</a> was originally published in <a href="https://medium.com/thebug">THEBUG</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Binary Search]]></title>
            <link>https://medium.com/thebug/binary-search-3edfba7040f1?source=rss-c730dc66fac8------2</link>
            <guid isPermaLink="false">https://medium.com/p/3edfba7040f1</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[hackerrank]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[leetcode]]></category>
            <dc:creator><![CDATA[THEBUG]]></dc:creator>
            <pubDate>Tue, 04 Jan 2022 15:13:41 GMT</pubDate>
            <atom:updated>2022-01-05T22:19:05.617Z</atom:updated>
            <content:encoded><![CDATA[<h3>Binary Search Using Python</h3><p><em>Note that there are two ways to perform binary search — iterative and recursive, we will only discuss the iterative way to perform binary serach.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vQ_g58PIS4m3UGGqr_Gw5Q.jpeg" /></figure><p>Binary Search is a commonly used algorithm to search a sorted list and with its O(log n) worse case complexity, its a thousand times faster than linear search. It is also one of the most commonly used algorithm questions during tech interviews.</p><p>Lets discuss how to implement Binary Search —</p><p>Lets take a sample array — [1,2,3,4,5,6] and try to figure out if the number 5 is within this sorted list using python.</p><p>The way Binary Search works is it takes a look at the middle element and sees if it is either bigger or smaller than the number we are trying to find —</p><p>If the number in the middle is the number we are trying to find, viola! we have found the value, and we don’t need to do anything else, however if the middle is bigger than the number we are trying to find, we know that the number is on the right side of the list.</p><p>[1,2,3,4,5,6] — middle is 4. (We are looking for 5, since the numbers on the right are bigger 5 must be in there)</p><p>Likewise, if the middle is smaller we know that the number we are looking for is on the left.</p><h3><strong>The Code</strong></h3><p>Now that we have discussed the theory of how Binary Search works, lets get into the code.</p><p>Remember, everything depends on the mid, so one of the most iportant things we need to do is, find the mid. And mid is simply the mid of the list. To calcualte this we need to just find the first — index, the last index and divide it by 2 — mid = (start + end)//2. (// is the floor division operator in python)</p><p>But wait! What is the start and the end? Initially the start will be 0 and the end will be the end of the list (len(list)-1), as we go about searching for our target element, we update the start and the end accordingly.</p><p>Here is the full solution —</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%252874%252C144%252C226%252C1%2529%26t%3Dmaterial%26wt%3Dnone%26l%3Dpython%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DFira%2BCode%26fs%3D14px%26lh%3D152%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Ddef%252520search%2528self%25252C%252520nums%25253A%252520List%25255Bint%25255D%25252C%252520target%25253A%252520int%2529%252520-%25253E%252520int%25253A%25250A%252520%252520%252520%252520start%252520%25253D%2525200%252520%25250A%252520%252520%252520%252520end%252520%25253D%252520len%2528nums%2529-1%25250A%252520%252520%252520%252520while%252520%2528start%252520%25253C%25253D%252520end%2529%25253A%25250A%252520%252520%252520%252520%252520%252520%252520%252520mid%252520%25253D%252520%2528%2528start%25252Bend%2529%25252F%25252F2%2529%25250A%252520%252520%252520%252520%252520%252520%252520%252520if%252520%2528nums%25255Bmid%25255D%25253D%25253Dtarget%2529%25253A%25250A%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520return%252520mid%25250A%252520%252520%252520%252520%252520%252520%252520%252520elif%252520%2528nums%25255Bmid%25255D%25253Ctarget%2529%25253A%25250A%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520start%252520%25253D%252520mid%25252B1%25250A%252520%252520%252520%252520%252520%252520%252520%252520else%25253A%25250A%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520%252520end%252520%25253D%252520mid-1%25250A%252520%252520%252520%252520return%252520-1%25250A%252520%252520%252520%252520%252520%252520%252520%252520&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%25252874%25252C144%25252C226%25252C1%252529%26t%3Dmaterial%26wt%3Dnone%26l%3Dpython%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DFira%2BCode%26fs%3D14px%26lh%3D152%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Ddef%25252520search%252528self%2525252C%25252520nums%2525253A%25252520List%2525255Bint%2525255D%2525252C%25252520target%2525253A%25252520int%252529%25252520-%2525253E%25252520int%2525253A%2525250A%25252520%25252520%25252520%25252520start%25252520%2525253D%252525200%25252520%2525250A%25252520%25252520%25252520%25252520end%25252520%2525253D%25252520len%252528nums%252529-1%2525250A%25252520%25252520%25252520%25252520while%25252520%252528start%25252520%2525253C%2525253D%25252520end%252529%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520mid%25252520%2525253D%25252520%252528%252528start%2525252Bend%252529%2525252F%2525252F2%252529%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520if%25252520%252528nums%2525255Bmid%2525255D%2525253D%2525253Dtarget%252529%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520return%25252520mid%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520elif%25252520%252528nums%2525255Bmid%2525255D%2525253Ctarget%252529%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520start%25252520%2525253D%25252520mid%2525252B1%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520else%2525253A%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520end%25252520%2525253D%25252520mid-1%2525250A%25252520%25252520%25252520%25252520return%25252520-1%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/add5cbf484c9571cfb5b8648b9d7e1bc/href">https://medium.com/media/add5cbf484c9571cfb5b8648b9d7e1bc/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3edfba7040f1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thebug/binary-search-3edfba7040f1">Binary Search</a> was originally published in <a href="https://medium.com/thebug">THEBUG</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>