Skip to content

Commit

Permalink
note update
Browse files Browse the repository at this point in the history
  • Loading branch information
xy-241 committed Dec 13, 2023
1 parent 24f85e4 commit 5f0dd54
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 18 deletions.
7 changes: 3 additions & 4 deletions content/cp/YetnotherrokenKeoard.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Author:
Author Profile:
- https://linkedin.com/in/xinyang-yu
Creation Date: 2023-12-13, 21:36
Last Date: 2023-12-13T21:52:08+08:00
Last Date: 2023-12-13T23:11:22+08:00
tags:
- cp
---
Expand All @@ -31,7 +31,8 @@ tags:
- Then we loop the original string, add characters that aren't `b` and `B` to form a new string which is the final answer


## Space & Time analysis
## Space & Time Analysis
The analysis method we are using is [[Algorithm Complexity Analysis]]
### Space - O(n)
- *Ignore input size & language dependent space*
- We are maintaining 2 [[Stack (FILO)]]
Expand Down Expand Up @@ -84,8 +85,6 @@ public class Solution {
}
}
}


```

## Personal Reflection
Expand Down
2 changes: 1 addition & 1 deletion public/DSA/Algorithms/Algorithm-Complexity-Analysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h2 id="references">References<a aria-hidden="true" tabindex="-1" data-no-popove
<ul>
<li><a href="https://www.youtube.com/watch?v=gCzOhZ_LUps" class="external alias">SimonDev</a></li>
<li><a href="https://www.hello-algo.com/chapter_computational_complexity/time_complexity/" class="external alias">Hello-algo</a></li>
</ul></article></div><div class="right sidebar"><div class="darkmode desktop-only"><input class="toggle" id="darkmode-toggle" type="checkbox" tabIndex="-1"/><label id="toggle-label-light" for="darkmode-toggle" tabIndex="-1"><svg xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" version="1.1" id="dayIcon" x="0px" y="0px" viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xmlSpace="preserve"><title>Light mode</title><path d="M6,17.5C6,16.672,5.328,16,4.5,16h-3C0.672,16,0,16.672,0,17.5 S0.672,19,1.5,19h3C5.328,19,6,18.328,6,17.5z M7.5,26c-0.414,0-0.789,0.168-1.061,0.439l-2,2C4.168,28.711,4,29.086,4,29.5 C4,30.328,4.671,31,5.5,31c0.414,0,0.789-0.168,1.06-0.44l2-2C8.832,28.289,9,27.914,9,27.5C9,26.672,8.329,26,7.5,26z M17.5,6 C18.329,6,19,5.328,19,4.5v-3C19,0.672,18.329,0,17.5,0S16,0.672,16,1.5v3C16,5.328,16.671,6,17.5,6z M27.5,9 c0.414,0,0.789-0.168,1.06-0.439l2-2C30.832,6.289,31,5.914,31,5.5C31,4.672,30.329,4,29.5,4c-0.414,0-0.789,0.168-1.061,0.44 l-2,2C26.168,6.711,26,7.086,26,7.5C26,8.328,26.671,9,27.5,9z M6.439,8.561C6.711,8.832,7.086,9,7.5,9C8.328,9,9,8.328,9,7.5 c0-0.414-0.168-0.789-0.439-1.061l-2-2C6.289,4.168,5.914,4,5.5,4C4.672,4,4,4.672,4,5.5c0,0.414,0.168,0.789,0.439,1.06 L6.439,8.561z M33.5,16h-3c-0.828,0-1.5,0.672-1.5,1.5s0.672,1.5,1.5,1.5h3c0.828,0,1.5-0.672,1.5-1.5S34.328,16,33.5,16z M28.561,26.439C28.289,26.168,27.914,26,27.5,26c-0.828,0-1.5,0.672-1.5,1.5c0,0.414,0.168,0.789,0.439,1.06l2,2 C28.711,30.832,29.086,31,29.5,31c0.828,0,1.5-0.672,1.5-1.5c0-0.414-0.168-0.789-0.439-1.061L28.561,26.439z M17.5,29 c-0.829,0-1.5,0.672-1.5,1.5v3c0,0.828,0.671,1.5,1.5,1.5s1.5-0.672,1.5-1.5v-3C19,29.672,18.329,29,17.5,29z M17.5,7 C11.71,7,7,11.71,7,17.5S11.71,28,17.5,28S28,23.29,28,17.5S23.29,7,17.5,7z M17.5,25c-4.136,0-7.5-3.364-7.5-7.5 c0-4.136,3.364-7.5,7.5-7.5c4.136,0,7.5,3.364,7.5,7.5C25,21.636,21.636,25,17.5,25z"></path></svg></label><label id="toggle-label-dark" for="darkmode-toggle" tabIndex="-1"><svg xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" version="1.1" id="nightIcon" x="0px" y="0px" viewBox="0 0 100 100" style="enable-background='new 0 0 100 100'" xmlSpace="preserve"><title>Dark mode</title><path d="M96.76,66.458c-0.853-0.852-2.15-1.064-3.23-0.534c-6.063,2.991-12.858,4.571-19.655,4.571 C62.022,70.495,50.88,65.88,42.5,57.5C29.043,44.043,25.658,23.536,34.076,6.47c0.532-1.08,0.318-2.379-0.534-3.23 c-0.851-0.852-2.15-1.064-3.23-0.534c-4.918,2.427-9.375,5.619-13.246,9.491c-9.447,9.447-14.65,22.008-14.65,35.369 c0,13.36,5.203,25.921,14.65,35.368s22.008,14.65,35.368,14.65c13.361,0,25.921-5.203,35.369-14.65 c3.872-3.871,7.064-8.328,9.491-13.246C97.826,68.608,97.611,67.309,96.76,66.458z"></path></svg></label></div><div class="toc desktop-only"><button type="button" id="toc" class><h3>Table of Contents</h3><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fold"><polyline points="6 9 12 15 18 9"></polyline></svg></button><div id="toc-content"><ul class="overflow"><li class="depth-0"><a href="#abstract" data-for="abstract">Abstract</a></li><li class="depth-0"><a href="#terminologies" data-for="terminologies">Terminologies</a></li><li class="depth-1"><a href="#space" data-for="space">Space</a></li><li class="depth-1"><a href="#time" data-for="time">Time</a></li><li class="depth-0"><a href="#references" data-for="references">References</a></li></ul></div></div><div class="backlinks "><h3>Backlinks</h3><ul class="overflow"><li><a href="../../DSA/Algorithms/Algorithms" class="internal">Algorithms</a></li></ul></div><div class="graph desktop-only"><h3>Graph View</h3><div class="graph-outer"><div id="graph-container" data-cfg="{&quot;drag&quot;:true,&quot;zoom&quot;:true,&quot;depth&quot;:1,&quot;scale&quot;:1.1,&quot;repelForce&quot;:0.5,&quot;centerForce&quot;:0.3,&quot;linkDistance&quot;:30,&quot;fontSize&quot;:0.6,&quot;opacityScale&quot;:1,&quot;showTags&quot;:true,&quot;removeTags&quot;:[]}"></div><svg version="1.1" id="global-graph-icon" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 55 55" fill="currentColor" xmlSpace="preserve"><path d="M49,0c-3.309,0-6,2.691-6,6c0,1.035,0.263,2.009,0.726,2.86l-9.829,9.829C32.542,17.634,30.846,17,29,17
</ul></article></div><div class="right sidebar"><div class="darkmode desktop-only"><input class="toggle" id="darkmode-toggle" type="checkbox" tabIndex="-1"/><label id="toggle-label-light" for="darkmode-toggle" tabIndex="-1"><svg xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" version="1.1" id="dayIcon" x="0px" y="0px" viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xmlSpace="preserve"><title>Light mode</title><path d="M6,17.5C6,16.672,5.328,16,4.5,16h-3C0.672,16,0,16.672,0,17.5 S0.672,19,1.5,19h3C5.328,19,6,18.328,6,17.5z M7.5,26c-0.414,0-0.789,0.168-1.061,0.439l-2,2C4.168,28.711,4,29.086,4,29.5 C4,30.328,4.671,31,5.5,31c0.414,0,0.789-0.168,1.06-0.44l2-2C8.832,28.289,9,27.914,9,27.5C9,26.672,8.329,26,7.5,26z M17.5,6 C18.329,6,19,5.328,19,4.5v-3C19,0.672,18.329,0,17.5,0S16,0.672,16,1.5v3C16,5.328,16.671,6,17.5,6z M27.5,9 c0.414,0,0.789-0.168,1.06-0.439l2-2C30.832,6.289,31,5.914,31,5.5C31,4.672,30.329,4,29.5,4c-0.414,0-0.789,0.168-1.061,0.44 l-2,2C26.168,6.711,26,7.086,26,7.5C26,8.328,26.671,9,27.5,9z M6.439,8.561C6.711,8.832,7.086,9,7.5,9C8.328,9,9,8.328,9,7.5 c0-0.414-0.168-0.789-0.439-1.061l-2-2C6.289,4.168,5.914,4,5.5,4C4.672,4,4,4.672,4,5.5c0,0.414,0.168,0.789,0.439,1.06 L6.439,8.561z M33.5,16h-3c-0.828,0-1.5,0.672-1.5,1.5s0.672,1.5,1.5,1.5h3c0.828,0,1.5-0.672,1.5-1.5S34.328,16,33.5,16z M28.561,26.439C28.289,26.168,27.914,26,27.5,26c-0.828,0-1.5,0.672-1.5,1.5c0,0.414,0.168,0.789,0.439,1.06l2,2 C28.711,30.832,29.086,31,29.5,31c0.828,0,1.5-0.672,1.5-1.5c0-0.414-0.168-0.789-0.439-1.061L28.561,26.439z M17.5,29 c-0.829,0-1.5,0.672-1.5,1.5v3c0,0.828,0.671,1.5,1.5,1.5s1.5-0.672,1.5-1.5v-3C19,29.672,18.329,29,17.5,29z M17.5,7 C11.71,7,7,11.71,7,17.5S11.71,28,17.5,28S28,23.29,28,17.5S23.29,7,17.5,7z M17.5,25c-4.136,0-7.5-3.364-7.5-7.5 c0-4.136,3.364-7.5,7.5-7.5c4.136,0,7.5,3.364,7.5,7.5C25,21.636,21.636,25,17.5,25z"></path></svg></label><label id="toggle-label-dark" for="darkmode-toggle" tabIndex="-1"><svg xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" version="1.1" id="nightIcon" x="0px" y="0px" viewBox="0 0 100 100" style="enable-background='new 0 0 100 100'" xmlSpace="preserve"><title>Dark mode</title><path d="M96.76,66.458c-0.853-0.852-2.15-1.064-3.23-0.534c-6.063,2.991-12.858,4.571-19.655,4.571 C62.022,70.495,50.88,65.88,42.5,57.5C29.043,44.043,25.658,23.536,34.076,6.47c0.532-1.08,0.318-2.379-0.534-3.23 c-0.851-0.852-2.15-1.064-3.23-0.534c-4.918,2.427-9.375,5.619-13.246,9.491c-9.447,9.447-14.65,22.008-14.65,35.369 c0,13.36,5.203,25.921,14.65,35.368s22.008,14.65,35.368,14.65c13.361,0,25.921-5.203,35.369-14.65 c3.872-3.871,7.064-8.328,9.491-13.246C97.826,68.608,97.611,67.309,96.76,66.458z"></path></svg></label></div><div class="toc desktop-only"><button type="button" id="toc" class><h3>Table of Contents</h3><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fold"><polyline points="6 9 12 15 18 9"></polyline></svg></button><div id="toc-content"><ul class="overflow"><li class="depth-0"><a href="#abstract" data-for="abstract">Abstract</a></li><li class="depth-0"><a href="#terminologies" data-for="terminologies">Terminologies</a></li><li class="depth-1"><a href="#space" data-for="space">Space</a></li><li class="depth-1"><a href="#time" data-for="time">Time</a></li><li class="depth-0"><a href="#references" data-for="references">References</a></li></ul></div></div><div class="backlinks "><h3>Backlinks</h3><ul class="overflow"><li><a href="../../DSA/Algorithms/Algorithms" class="internal">Algorithms</a></li><li><a href="../../cp/YetnotherrokenKeoard" class="internal">YetnotherrokenKeoard</a></li></ul></div><div class="graph desktop-only"><h3>Graph View</h3><div class="graph-outer"><div id="graph-container" data-cfg="{&quot;drag&quot;:true,&quot;zoom&quot;:true,&quot;depth&quot;:1,&quot;scale&quot;:1.1,&quot;repelForce&quot;:0.5,&quot;centerForce&quot;:0.3,&quot;linkDistance&quot;:30,&quot;fontSize&quot;:0.6,&quot;opacityScale&quot;:1,&quot;showTags&quot;:true,&quot;removeTags&quot;:[]}"></div><svg version="1.1" id="global-graph-icon" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 55 55" fill="currentColor" xmlSpace="preserve"><path d="M49,0c-3.309,0-6,2.691-6,6c0,1.035,0.263,2.009,0.726,2.86l-9.829,9.829C32.542,17.634,30.846,17,29,17
s-3.542,0.634-4.898,1.688l-7.669-7.669C16.785,10.424,17,9.74,17,9c0-2.206-1.794-4-4-4S9,6.794,9,9s1.794,4,4,4
c0.74,0,1.424-0.215,2.019-0.567l7.669,7.669C21.634,21.458,21,23.154,21,25s0.634,3.542,1.688,4.897L10.024,42.562
C8.958,41.595,7.549,41,6,41c-3.309,0-6,2.691-6,6s2.691,6,6,6s6-2.691,6-6c0-1.035-0.263-2.009-0.726-2.86l12.829-12.829
Expand Down
11 changes: 5 additions & 6 deletions public/cp/YetnotherrokenKeoard.html

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions public/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
&lt;li&gt;When we see a &lt;code&gt;b&lt;/code&gt; or &lt;code&gt;B&lt;/code&gt;, we just delete the first element from the corresponding stack by replacing the element at that index with either &lt;code&gt;b&lt;/code&gt; or &lt;code&gt;B&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Then we loop the original string, add characters that aren’t &lt;code&gt;b&lt;/code&gt; and &lt;code&gt;B&lt;/code&gt; to form a new string which is the final answer&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;space--time-analysis&quot;&gt;Space &amp;#x26; Time analysis&lt;a aria-hidden tabindex=&quot;-1&quot; data-no-popover href=&quot;#space--time-analysis&quot; class=&quot;internal alias&quot;&gt; §&lt;/a&gt;&lt;/h2&gt;
&lt;h2 id=&quot;space--time-analysis&quot;&gt;Space &amp;#x26; Time Analysis&lt;a aria-hidden tabindex=&quot;-1&quot; data-no-popover href=&quot;#space--time-analysis&quot; class=&quot;internal alias&quot;&gt; §&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The analysis method we are using is &lt;a href=&quot;../DSA/Algorithms/Algorithm-Complexity-Analysis&quot; class=&quot;internal alias&quot; data-slug=&quot;DSA/Algorithms/Algorithm-Complexity-Analysis&quot;&gt;Algorithm Complexity Analysis&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;space---on&quot;&gt;Space - O(n)&lt;a aria-hidden tabindex=&quot;-1&quot; data-no-popover href=&quot;#space---on&quot; class=&quot;internal alias&quot;&gt; §&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Ignore input size &amp;#x26; language dependent space&lt;/em&gt;&lt;/li&gt;
Expand Down Expand Up @@ -69,9 +70,7 @@
&lt;span data-line=&quot;&quot;&gt;&lt;span style=&quot;color: var(--shiki-color-text)&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: var(--shiki-token-constant)&quot;&gt;System&lt;/span&gt;&lt;span style=&quot;color: var(--shiki-token-punctuation)&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: var(--shiki-token-constant)&quot;&gt;out&lt;/span&gt;&lt;span style=&quot;color: var(--shiki-token-punctuation)&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: var(--shiki-token-function)&quot;&gt;println&lt;/span&gt;&lt;span style=&quot;color: var(--shiki-color-text)&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: var(--shiki-token-constant)&quot;&gt;sb&lt;/span&gt;&lt;span style=&quot;color: var(--shiki-token-punctuation)&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: var(--shiki-token-function)&quot;&gt;toString&lt;/span&gt;&lt;span style=&quot;color: var(--shiki-color-text)&quot;&gt;());&lt;/span&gt;&lt;/span&gt;
&lt;span data-line=&quot;&quot;&gt;&lt;span style=&quot;color: var(--shiki-color-text)&quot;&gt; }&lt;/span&gt;&lt;/span&gt;
&lt;span data-line=&quot;&quot;&gt;&lt;span style=&quot;color: var(--shiki-color-text)&quot;&gt; }&lt;/span&gt;&lt;/span&gt;
&lt;span data-line=&quot;&quot;&gt;&lt;span style=&quot;color: var(--shiki-color-text)&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span data-line=&quot;&quot;&gt; &lt;/span&gt;
&lt;span data-line=&quot;&quot;&gt; &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;span data-line=&quot;&quot;&gt;&lt;span style=&quot;color: var(--shiki-color-text)&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&quot;personal-reflection&quot;&gt;Personal Reflection&lt;a aria-hidden tabindex=&quot;-1&quot; data-no-popover href=&quot;#personal-reflection&quot; class=&quot;internal alias&quot;&gt; §&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Why it takes so long to solve:&lt;/strong&gt; &lt;em&gt;NIL&lt;/em&gt;&lt;/li&gt;
Expand All @@ -81,7 +80,7 @@
&lt;li&gt;&lt;strong&gt;Ideas you found here that could help you later:&lt;/strong&gt; Understand the properties of &lt;a href=&quot;../DSA/Data-Structure/Data-Structure&quot; class=&quot;internal alias&quot; data-slug=&quot;DSA/Data-Structure/Data-Structure&quot;&gt;Data Structure&lt;/a&gt; well&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ideas that didn’t work and why:&lt;/strong&gt; &lt;em&gt;NIL&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
<pubDate>Wed, 13 Dec 2023 13:52:08 GMT</pubDate>
<pubDate>Wed, 13 Dec 2023 15:11:22 GMT</pubDate>
</item><item>
<title>Linked List</title>
<link>https://notes.yxy.ninja/DSA/Data-Structure/Linked-List/Linked-List</link>
Expand Down
2 changes: 1 addition & 1 deletion public/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2112,7 +2112,7 @@
<lastmod>2023-08-03T02:24:52.000Z</lastmod>
</url><url>
<loc>https://notes.yxy.ninja/cp/YetnotherrokenKeoard</loc>
<lastmod>2023-12-13T13:52:08.000Z</lastmod>
<lastmod>2023-12-13T15:11:22.000Z</lastmod>
</url><url>
<loc>https://notes.yxy.ninja//</loc>
<lastmod>2023-12-09T15:30:02.000Z</lastmod>
Expand Down
2 changes: 1 addition & 1 deletion public/static/contentIndex.json

Large diffs are not rendered by default.

0 comments on commit 5f0dd54

Please sign in to comment.