<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kishore kunal</title>
    <description>The latest articles on DEV Community by Kishore kunal (@hesoyamm).</description>
    <link>https://dev.to/hesoyamm</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F833243%2F6b9f5bbd-dd7a-4caa-8ae0-2395736aacf8.jpeg</url>
      <title>DEV Community: Kishore kunal</title>
      <link>https://dev.to/hesoyamm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hesoyamm"/>
    <language>en</language>
    <item>
      <title>#day 19 of solving [53/450] questions</title>
      <dc:creator>Kishore kunal</dc:creator>
      <pubDate>Fri, 15 Apr 2022 10:12:47 +0000</pubDate>
      <link>https://dev.to/hesoyamm/day-19-of-solving-53450-questions-1b26</link>
      <guid>https://dev.to/hesoyamm/day-19-of-solving-53450-questions-1b26</guid>
      <description>&lt;p&gt;&lt;a href="https://leetcode.com/problems/contains-duplicate/submissions/"&gt;Duplicates&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;:dictionary&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/two-sum/"&gt;2 sum&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NeaRH2nH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eby0f499j8bqnsi9zv9c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NeaRH2nH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eby0f499j8bqnsi9zv9c.png" alt="Image description" width="880" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>#day 18 of solving [51/480]</title>
      <dc:creator>Kishore kunal</dc:creator>
      <pubDate>Fri, 08 Apr 2022 16:21:06 +0000</pubDate>
      <link>https://dev.to/hesoyamm/day-18-of-solving-51480-59ao</link>
      <guid>https://dev.to/hesoyamm/day-18-of-solving-51480-59ao</guid>
      <description>&lt;p&gt;&lt;a href="https://leetcode.com/problems/sum-of-two-integers/"&gt;sum-of-two-integers&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As explain in previous post  why python can't handle carry:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LAuXZkxM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/edk87keuh36tflkntl1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LAuXZkxM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/edk87keuh36tflkntl1l.png" alt="Image description" width="880" height="171"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/reverse-intege"&gt;reverse-integer&lt;/a&gt;\&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VocW6DEF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/03o5tj1x85dbmcq1qcuv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VocW6DEF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/03o5tj1x85dbmcq1qcuv.png" alt="Image description" width="880" height="239"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/string-to-integer-atoi/"&gt;myAtoi Algo &lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Adding two number without (+, -) LT:371</title>
      <dc:creator>Kishore kunal</dc:creator>
      <pubDate>Wed, 06 Apr 2022 14:06:21 +0000</pubDate>
      <link>https://dev.to/hesoyamm/adding-two-number-without-lt371-48o6</link>
      <guid>https://dev.to/hesoyamm/adding-two-number-without-lt371-48o6</guid>
      <description>&lt;p&gt;&lt;strong&gt;Why does this black magic bitwise stuff work?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Recall that bitwise xor is 1 when the bits differ, and 0 when the bits are the same. &lt;br&gt;
For example (where D is decimal and B is binary), 20D == 10100B, and 9D = 1001B:&lt;/p&gt;

&lt;p&gt;10100&lt;br&gt;
  1001&lt;/p&gt;




&lt;p&gt;11101&lt;br&gt;
and 11101B == 29D.&lt;/p&gt;

&lt;p&gt;But, &lt;em&gt;&lt;strong&gt;if you have a case with a carry&lt;/strong&gt;&lt;/em&gt;, it doesn't work so well. For example, consider adding (bitwise xor) 20D and 20D.&lt;/p&gt;

&lt;p&gt;10100&lt;/p&gt;

&lt;h2&gt;
  
  
  10100
&lt;/h2&gt;

&lt;p&gt;00000&lt;br&gt;
Oops. 20 + 20 certainly doesn't equal 0. Enter the (a &amp;amp; b) &amp;lt;&amp;lt; 1 term. This term represents the "carry" for each position. On the next iteration of the while loop, we add in the carry from the previous loop. So, if we go with the example we had before, we get:&lt;/p&gt;

&lt;h1&gt;
  
  
  First iteration (a is 20, b is 20)
&lt;/h1&gt;

&lt;p&gt;10100 ^ 10100 == 00000 # makes a 0&lt;br&gt;
(10100 &amp;amp; 10100) &amp;lt;&amp;lt; 1 == 101000 # makes b 40&lt;/p&gt;

&lt;h1&gt;
  
  
  Second iteration:
&lt;/h1&gt;

&lt;p&gt;000000 ^ 101000 == 101000 # Makes a 40&lt;br&gt;
(000000 &amp;amp; 101000) &amp;lt;&amp;lt; 1 == 0000000 # Makes b 0&lt;br&gt;
Now b is 0, we are done, so return a.&lt;/p&gt;

&lt;p&gt;This algorithm works in general, not just for the specific cases I've outlined. Proof of correctness is left to the reader as an exercise ;)&lt;/p&gt;

&lt;h2&gt;
  
  
  Python solution(most upvoted)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def getSum(self, a, b):
        """
        :type a: int
        :type b: int
        :rtype: int
        """
        MAX_INT = 0x7FFFFFFF
        MIN_INT = 0x80000000
        MASK = 0x100000000
        while b:
            a, b = (a ^ b) % MASK, ((a &amp;amp; b) &amp;lt;&amp;lt; 1) % MASK
        return a if a &amp;lt;= MAX_INT else ~((a % MIN_INT) ^ MAX_INT)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What do the masks do?&lt;/p&gt;

&lt;p&gt;All the masks are doing is ensuring that the value is an integer, because your code even has comments stating that a, b, and the return type are of type int. Thus, since the maximum possible int (32 bits) is 2147483647. So, if you add 2 to this value, like you did in your example, the int overflows and you get a negative value. You have to force this in Python, because it doesn't respect this int boundary that other strongly typed languages like Java and C++ have defined. Consider the following:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;def get_sum(a, b):&lt;br&gt;
    while b:&lt;br&gt;
        a, b = (a ^ b), (a &amp;amp; b) &amp;lt;&amp;lt; 1&lt;br&gt;
    return a&lt;br&gt;
This is the version of getSum without the masks.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;_print get_sum(2147483647, 2)&lt;br&gt;
outputs&lt;/p&gt;

&lt;p&gt;2147483649&lt;br&gt;
while&lt;/p&gt;

&lt;p&gt;print Solution().getSum(2147483647, 2)&lt;br&gt;
outputs&lt;/p&gt;

&lt;p&gt;-2147483647&lt;br&gt;
due to the overflow.&lt;br&gt;
_&lt;br&gt;
The moral of the story is the implementation is correct if you define the int type to only represent 32 bits.&lt;/p&gt;

</description>
      <category>bitwisee</category>
      <category>problemsolving</category>
      <category>programming</category>
    </item>
    <item>
      <title>#day 17 of solving [48/450] questions</title>
      <dc:creator>Kishore kunal</dc:creator>
      <pubDate>Wed, 06 Apr 2022 13:56:37 +0000</pubDate>
      <link>https://dev.to/hesoyamm/day-17-of-solving-48450-questions-5f1b</link>
      <guid>https://dev.to/hesoyamm/day-17-of-solving-48450-questions-5f1b</guid>
      <description>&lt;p&gt;Next few post will all be about solving bitwise question.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/single-number"&gt;Single-number&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return (x := 0, [x := x ^ v for v in nums])[-1][-1]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OYNoUUto--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4c9e53wgsctt5vzsh251.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OYNoUUto--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4c9e53wgsctt5vzsh251.png" alt="Image description" width="826" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/number-of-1-bit"&gt;number-of-1-bit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Approach 1 : using in-built fn to count 1 bits&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zgW5Hd_---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c3q82fznoa4q1jfn07gu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zgW5Hd_---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c3q82fznoa4q1jfn07gu.png" alt="Image description" width="880" height="145"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Approach 2: &lt;/p&gt;

&lt;p&gt;Think of a number in binary n = XXXXXX1000, n - 1 is XXXXXX0111. n &amp;amp; (n - 1) will be XXXXXX0000 which is just remove the last significant 1****&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Fj13yftG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mbk418h9yvbwzykgopmi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Fj13yftG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mbk418h9yvbwzykgopmi.png" alt="Image description" width="880" height="178"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/counting-bits/"&gt;counting-bits/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HU0wKt5O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nc3pxwoztx6v42jrxjir.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HU0wKt5O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nc3pxwoztx6v42jrxjir.png" alt="Image description" width="880" height="137"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;self made one liner&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/missing-number"&gt;missing-number&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Two Approach:&lt;br&gt;
1) total_sum - n*(n+1)/2&lt;br&gt;
2) xor of (1........n) ^(1...............n) == missing number&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xhT63bHD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c6ut45f2vn5oe17tui7v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xhT63bHD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c6ut45f2vn5oe17tui7v.png" alt="Image description" width="880" height="144"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HsJLRMZQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ikaqsvwjjv09i5nbp6m9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HsJLRMZQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ikaqsvwjjv09i5nbp6m9.png" alt="Image description" width="880" height="238"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>#day 16 of solving [44/450] questions</title>
      <dc:creator>Kishore kunal</dc:creator>
      <pubDate>Tue, 05 Apr 2022 17:35:31 +0000</pubDate>
      <link>https://dev.to/hesoyamm/day-16-of-solving-44450-questions-2i3h</link>
      <guid>https://dev.to/hesoyamm/day-16-of-solving-44450-questions-2i3h</guid>
      <description>&lt;p&gt;&lt;a href="https://leetcode.com/problems/shuffle-string/"&gt;Shuffle String&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/generate-a-string-with-characters-that-have-odd-counts/"&gt;generate-a-string-with-characters-that-have-odd-counts&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>#day 15 of solving [42/450]</title>
      <dc:creator>Kishore kunal</dc:creator>
      <pubDate>Mon, 04 Apr 2022 17:42:48 +0000</pubDate>
      <link>https://dev.to/hesoyamm/day-15-of-solving-42450-2fmd</link>
      <guid>https://dev.to/hesoyamm/day-15-of-solving-42450-2fmd</guid>
      <description>&lt;p&gt;&lt;a href="https://leetcode.com/problems/valid-anagram/submissions/"&gt;valid-anagram&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fiICcIcc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wkilo10yvq9evw44uywz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fiICcIcc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wkilo10yvq9evw44uywz.png" alt="Image description" width="880" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/rank-scores/submissions/"&gt;rank-scores&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/employees-earning-more-than-their-managers"&gt;employees-earning-more-than-their-managers&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Very tired from work :( , will do more tomorrow.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>#Day 14 of solving [41/450] questions</title>
      <dc:creator>Kishore kunal</dc:creator>
      <pubDate>Sun, 03 Apr 2022 14:46:31 +0000</pubDate>
      <link>https://dev.to/hesoyamm/day-14-of-solving-41450-questions-1hed</link>
      <guid>https://dev.to/hesoyamm/day-14-of-solving-41450-questions-1hed</guid>
      <description>&lt;p&gt;&lt;a href="https://leetcode.com/problems/bulls-and-cows/submissions/"&gt;bulls-and-cows&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2bB7qK9R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t8q9rywq9vffkfvowh4r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2bB7qK9R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t8q9rywq9vffkfvowh4r.png" alt="Image description" width="880" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/next-greater-element-i/submissions/"&gt;next-greater&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7fcEtpx6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gxx61h6pvup65wk5otr6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7fcEtpx6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gxx61h6pvup65wk5otr6.png" alt="Image description" width="880" height="301"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/daily-temperatures/"&gt;daily-temperatures&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>#day 13 of solving [38/450] questions</title>
      <dc:creator>Kishore kunal</dc:creator>
      <pubDate>Fri, 01 Apr 2022 18:33:10 +0000</pubDate>
      <link>https://dev.to/hesoyamm/day-13-of-solving-38450-questions-3ema</link>
      <guid>https://dev.to/hesoyamm/day-13-of-solving-38450-questions-3ema</guid>
      <description>&lt;p&gt;&lt;a href="https://leetcode.com/problems/valid-parentheses/submissions/"&gt;Valid Parentheses&lt;/a&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VvkcybA_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/51oarabnzzvyym9w3x67.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VvkcybA_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/51oarabnzzvyym9w3x67.png" alt="Image description" width="880" height="300"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://leetcode.com/problems/majority-element/submissions/"&gt;Majority Element&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--w1K3xHf4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ekjejr7eew0apijl9e34.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--w1K3xHf4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ekjejr7eew0apijl9e34.png" alt="Image description" width="880" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>#day 12 of solving 450 questions[36/450]</title>
      <dc:creator>Kishore kunal</dc:creator>
      <pubDate>Thu, 31 Mar 2022 13:48:17 +0000</pubDate>
      <link>https://dev.to/hesoyamm/day-12-of-solving-450-questions36450-1g4p</link>
      <guid>https://dev.to/hesoyamm/day-12-of-solving-450-questions36450-1g4p</guid>
      <description>&lt;p&gt;&lt;a href="https://leetcode.com/problems/isomorphic-strings/" rel="noopener noreferrer"&gt;Isomorphic Strings&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb0rw0c01m7uu3fk8fvz1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb0rw0c01m7uu3fk8fvz1.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
xD : Truly Pythonic&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/split-a-string-in-balanced-strings" rel="noopener noreferrer"&gt;split-a-string-in-balanced-strings&lt;/a&gt;&lt;br&gt;
 &lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frcrmj52vmi9q4xsmd9wp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frcrmj52vmi9q4xsmd9wp.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
    </item>
    <item>
      <title>#day 11 of solving 450 questions[34/450]</title>
      <dc:creator>Kishore kunal</dc:creator>
      <pubDate>Wed, 30 Mar 2022 19:40:04 +0000</pubDate>
      <link>https://dev.to/hesoyamm/day-11-of-solving-450-questions450-3aed</link>
      <guid>https://dev.to/hesoyamm/day-11-of-solving-450-questions450-3aed</guid>
      <description>&lt;p&gt;Questions solved:&lt;br&gt;
&lt;a href="https://practice.geeksforgeeks.org/problems/three-way-partitioning/1#"&gt;three-way-partitioning&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  two pointer approach.
&lt;/h1&gt;

&lt;h1&gt;
  
  
  left=left-1 increment only if find &amp;lt;a , right = max ,
&lt;/h1&gt;

&lt;p&gt;decrement only if find&lt;b&gt; do same for right .&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--P3kfPdnN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/crh1orz7gzej0qx8mtkm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P3kfPdnN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/crh1orz7gzej0qx8mtkm.png" alt="Image description" width="743" height="497"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/rotate-string/submissions/"&gt;rotate-string&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Beautiful Solution :&lt;br&gt;
&lt;strong&gt;len(s)==len(goal) and goal in s+s&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;0(n) possible through KMP (not learned yet)&lt;/p&gt;

&lt;p&gt;As I am going to begin with LinkedList: Wanted to freshen up on OOPS concept(has been a long time since last used it)&lt;/p&gt;

&lt;p&gt;`species='mammal'&lt;/p&gt;

&lt;p&gt;class Dog():&lt;br&gt;
    def &lt;strong&gt;init&lt;/strong&gt;(self,breed,name):&lt;br&gt;
        self.breed=breed&lt;br&gt;
        self.name=name&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;init can be thought as constructor for the class&lt;/li&gt;
&lt;li&gt;it will be called automatically when u create instance of a class&lt;/li&gt;
&lt;li&gt;self-&amp;gt;represents as  instance of the object itself.&lt;/li&gt;
&lt;li&gt;attribute &lt;/li&gt;
&lt;li&gt;we take in the argument &lt;/li&gt;
&lt;li&gt;assign it using self.attrivute_name&lt;/li&gt;
&lt;li&gt;operations/acitons-----&amp;gt;method is a fn that is inside of class that will work with object in some way
def bark(self,number):
    print("WOOF! my name is {} and my number is {}".format(self.name,number))&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;my_dog=Dog('lab','Frankie')&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;notice this we are getting an error as we havent given any positional argument&lt;/li&gt;
&lt;li&gt;because we are expecting breed parameter&lt;/li&gt;
&lt;li&gt;so lets pass one&lt;/li&gt;
&lt;li&gt;notice that attributes , never have () that because attributes it not something you execu&lt;/li&gt;
&lt;li&gt;it is something you call back&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;print(my_dog.breed,my_dog.name)&lt;/p&gt;

&lt;p&gt;my_dog.bark(10)&lt;/p&gt;

&lt;h1&gt;
  
  
  called method
&lt;/h1&gt;

&lt;p&gt;class circle:&lt;br&gt;
    #clas sobject attribute&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def __init__(self):
    self.pi=3.15
def circumference(self,radius):
        return radius*self.pi*2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;C=circle()&lt;br&gt;
C.circumference(2)`&lt;/p&gt;

</description>
    </item>
    <item>
      <title>#Day 10 of solving 450 questions [32/450]</title>
      <dc:creator>Kishore kunal</dc:creator>
      <pubDate>Tue, 29 Mar 2022 18:36:27 +0000</pubDate>
      <link>https://dev.to/hesoyamm/day-10-of-solving-450-questions-32450-2l7b</link>
      <guid>https://dev.to/hesoyamm/day-10-of-solving-450-questions-32450-2l7b</guid>
      <description>&lt;p&gt;Question solved:&lt;/p&gt;

&lt;h2&gt;
  
  
  [TRAPPING RAIN WATER]
&lt;/h2&gt;

&lt;p&gt;(&lt;a href="https://leetcode.com/problems/trapping-rain-water/"&gt;https://leetcode.com/problems/trapping-rain-water/&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CEqf4WLl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3iyrs8y53pnajln4nyie.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CEqf4WLl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3iyrs8y53pnajln4nyie.png" alt="Image description" width="880" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/minimum-operations-to-reduce-x-to-zero/"&gt;minimum-operations-to-reduce-x-to-zero&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
    </item>
    <item>
      <title>#Day 9 of Solving 450 Questions[30/450]</title>
      <dc:creator>Kishore kunal</dc:creator>
      <pubDate>Mon, 28 Mar 2022 15:37:10 +0000</pubDate>
      <link>https://dev.to/hesoyamm/day-9-of-solving-450-questions31450-2geg</link>
      <guid>https://dev.to/hesoyamm/day-9-of-solving-450-questions31450-2geg</guid>
      <description>&lt;p&gt;📅Day 9 : March 28,2022&lt;br&gt;
Problems solved today :&lt;br&gt;
&lt;a href="https://practice.geeksforgeeks.org/problems/triplet-sum-in-array-1587115621/1"&gt;Triplet Sum in Array &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--b6oU-96m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eappqnymlvwni66m2x1u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b6oU-96m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eappqnymlvwni66m2x1u.png" alt="Image description" width="691" height="674"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/second-highest-salary/submissions/"&gt;second-highest-salary&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5fkguarD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l5y05mpyxqsz8vm7z5ag.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5fkguarD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l5y05mpyxqsz8vm7z5ag.png" alt="Image description" width="492" height="83"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
    </item>
  </channel>
</rss>
