<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>My epic padlet by rianna l</title>
      <link>https://padlet.com/riannalei/njn085elyu1gf453</link>
      <description></description>
      <language>en-us</language>
      <pubDate>2024-02-23 02:08:00 UTC</pubDate>
      <lastBuildDate>2024-02-23 02:47:04 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url></url>
      </image>
      <item>
         <title>Hello</title>
         <author>riannalei</author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893115685</link>
         <description><![CDATA[<p>text</p>]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:09:41 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893115685</guid>
      </item>
      <item>
         <title>should we start with problem 1</title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893116243</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:10:15 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893116243</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893116530</link>
         <description><![CDATA[<p>for number 1 we can iterate through array and use a set to keep track of visited values</p><p><br/></p>]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:10:38 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893116530</guid>
      </item>
      <item>
         <title>yeah, and return true and break when it finds a value twice</title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893117608</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:12:03 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893117608</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893117817</link>
         <description><![CDATA[<p>yea that sounds good</p>]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:12:19 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893117817</guid>
      </item>
      <item>
         <title></title>
         <author>riannalei</author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893118219</link>
         <description><![CDATA[<pre><code class="language-python">def containsDuplicate(self, nums):
       hashset = set()  #Initialize hashset as a set
       if len(nums) == 0:
           return False
       else:
           for n in nums:
               if n in hashset:
                   return True
               else:
                   hashset.add(n)  # Add unique elements to hashset
           return False  # No duplicates found, return False</code></pre>]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:12:53 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893118219</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893119628</link>
         <description><![CDATA[<p>how were you able to write code in the box</p>]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:14:45 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893119628</guid>
      </item>
      <item>
         <title></title>
         <author>riannalei</author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893121477</link>
         <description><![CDATA[<p>i used leetcodes platform to write it and then just pasted it here</p>]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:17:10 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893121477</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893122401</link>
         <description><![CDATA[<p>for problem 2</p><p>I was thinking we take the first num, add it to each number in the list using a for loop, comparing the result with target, then if not found, goes back, takes the second element does the same thing, basically iterating. It is a tedious process and has high cost, what do u think, any other ideas?</p><p><br></p>]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:18:14 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893122401</guid>
      </item>
      <item>
         <title>a hash map would be better I think</title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893123448</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:19:36 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893123448</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893123947</link>
         <description><![CDATA[<p>both approaches would work, but hash map might be better for Time complexity </p><p><br/></p>]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:20:20 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893123947</guid>
      </item>
      <item>
         <title>yeah ur right</title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893124236</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:20:45 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893124236</guid>
      </item>
      <item>
         <title></title>
         <author>riannalei</author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893130938</link>
         <description><![CDATA[<p>do u use enumerate? </p>]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:30:10 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893130938</guid>
      </item>
      <item>
         <title>yeah</title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893135188</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:36:06 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893135188</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893135432</link>
         <description><![CDATA[<pre><code class="language-python">def solution(array, target):
    #Using hashmap to store the sum complements
    hashmap ={}

    for i in range(len(array)):
        #if the target 
        if target - array[i] in hashmap:
            return [i, hashmap[target - array[i]]]
        else:
            hashmap[target - array[i]] = i
         </code></pre>]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:36:25 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893135432</guid>
      </item>
      <item>
         <title>corrected version</title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893138918</link>
         <description><![CDATA[<pre><code class="language-python">def solution(array, target):
    #Using hashmap to store the sum complements
    hashmap ={}

    for i in range(len(array)):
        #if the target 
        if target - array[i] in hashmap:
            return [i, hashmap[target - array[i]]]
        else:
            hashmap[array[i]] = i
           </code></pre>]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:40:55 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893138918</guid>
      </item>
      <item>
         <title>hashtable, we check the difference between each entry and see if its one?</title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893142295</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:45:43 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893142295</guid>
      </item>
      <item>
         <title>do we leave it unsorted or can we sort it first?</title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893142807</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:46:31 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893142807</guid>
      </item>
      <item>
         <title>no no 3rd</title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893143254</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:47:04 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893143254</guid>
      </item>
      <item>
         <title>my bad</title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893143303</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:47:09 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893143303</guid>
      </item>
      <item>
         <title>it has to be sorted for the second example to work right</title>
         <author></author>
         <link>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893143708</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2024-02-23 02:47:47 UTC</pubDate>
         <guid>https://padlet.com/riannalei/njn085elyu1gf453/wish/2893143708</guid>
      </item>
   </channel>
</rss>
