File tree Expand file tree Collapse file tree
best-time-to-buy-and-sell-stock
longest-palindromic-substring Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ <h1>Best Time to Buy and Sell Stock</h1>
2828 </ div >
2929 </ div >
3030
31+ < div class ="main-content ">
3132 < div class ="visualization ">
3233 < div class ="section-title "> Stock Prices</ div >
3334 < div class ="chart-container ">
@@ -104,6 +105,7 @@ <h3>Max Profit</h3>
104105 < span class ="code-keyword "> return</ span > profit
105106 </ div >
106107 </ div >
108+ </ div >
107109 </ div >
108110
109111 < script src ="../../shared/js/visualizer.js "> </ script >
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ <h1>Maximum Subarray</h1>
2828 </ div >
2929 </ div >
3030
31+ < div class ="main-content ">
3132 < div class ="visualization ">
3233 < div class ="section-title "> Array</ div >
3334 < div class ="array-container " id ="arrayDisplay "> </ div >
@@ -109,6 +110,7 @@ <h3>Max Subarray</h3>
109110 < span class ="code-keyword "> return</ span > max
110111 </ div >
111112 </ div >
113+ </ div >
112114 </ div >
113115
114116 < script src ="../../shared/js/visualizer.js "> </ script >
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ <h1>Sort Colors - Dutch National Flag</h1>
2828 </ div >
2929 </ div >
3030
31+ < div class ="main-content ">
3132 < div class ="visualization ">
3233 < div class ="section-title "> Array</ div >
3334
@@ -136,6 +137,7 @@ <h3>High Pointer</h3>
136137 high -= < span class ="code-number "> 1</ span >
137138 </ div >
138139 </ div >
140+ </ div >
139141 </ div >
140142
141143 < script src ="../../shared/js/visualizer.js "> </ script >
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ <h1>Two Sum Algorithm</h1>
3131 </ div >
3232 </ div >
3333
34+ < div class ="main-content ">
3435 < div class ="visualization ">
3536 < div class ="section-title "> Array</ div >
3637 < div class ="array-container " id ="arrayDisplay "> </ div >
@@ -105,6 +106,7 @@ <h3>Target</h3>
105106 numsMap[nums[i]] = i
106107 </ div >
107108 </ div >
109+ </ div >
108110 </ div >
109111
110112 < script src ="../../shared/js/visualizer.js "> </ script >
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ <h1>Number of Islands</h1>
2828 </ div >
2929 </ div >
3030
31+ < div class ="main-content ">
3132 < div class ="visualization ">
3233 < div class ="section-title "> Grid</ div >
3334 < div class ="grid-container " id ="gridContainer "> </ div >
@@ -115,6 +116,7 @@ <h3>DFS Stack</h3>
115116 dfs(i+di, j+dj)
116117 </ div >
117118 </ div >
119+ </ div >
118120 </ div >
119121
120122 < script src ="../../shared/js/visualizer.js "> </ script >
Original file line number Diff line number Diff line change @@ -19,10 +19,17 @@ body {
1919
2020/* Layout */
2121.container {
22- max-width : 1000 px ;
22+ max-width : 1400 px ;
2323 margin : 0 auto;
2424}
2525
26+ /* Main Content - Side by Side Layout */
27+ .main-content {
28+ display : flex;
29+ gap : 20px ;
30+ align-items : flex-start;
31+ }
32+
2633h1 {
2734 text-align : center;
2835 margin-bottom : 10px ;
@@ -168,6 +175,8 @@ button:disabled {
168175 border-radius : 15px ;
169176 padding : 30px ;
170177 margin-bottom : 20px ;
178+ flex : 3 ;
179+ min-width : 0 ;
171180}
172181
173182.section-title {
@@ -313,7 +322,12 @@ button:disabled {
313322 background : # 1e1e3f ;
314323 border-radius : 15px ;
315324 padding : 20px ;
316- margin-top : 20px ;
325+ flex : 2 ;
326+ position : sticky;
327+ top : 20px ;
328+ max-height : calc (100vh - 40px );
329+ overflow-y : auto;
330+ min-width : 0 ;
317331}
318332
319333.code-line {
@@ -693,6 +707,23 @@ button:disabled {
693707}
694708
695709/* Responsive */
710+ @media (max-width : 1024px ) {
711+ .main-content {
712+ flex-direction : column;
713+ }
714+
715+ .visualization {
716+ flex : none;
717+ }
718+
719+ .code-panel {
720+ flex : none;
721+ position : static;
722+ max-height : none;
723+ overflow-y : visible;
724+ }
725+ }
726+
696727@media (max-width : 768px ) {
697728 .container {
698729 padding : 10px ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ <h1>KMP Pattern Matching</h1>
3131 </ div >
3232 </ div >
3333
34+ < div class ="main-content ">
3435 < div class ="visualization ">
3536 < div class ="section-title "> Text (Haystack)</ div >
3637 < div class ="string-container " id ="haystackDisplay "> </ div >
@@ -120,6 +121,7 @@ <h3>Status</h3>
120121 < span class ="code-keyword "> return</ span > -< span class ="code-number "> 1</ span >
121122 </ div >
122123 </ div >
124+ </ div >
123125 </ div >
124126
125127 < script src ="../../shared/js/visualizer.js "> </ script >
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ <h1>Longest Palindromic Substring</h1>
2828 </ div >
2929 </ div >
3030
31+ < div class ="main-content ">
3132 < div class ="visualization ">
3233 < div class ="section-title "> String</ div >
3334 < div class ="string-container " id ="stringDisplay "> </ div >
@@ -108,6 +109,7 @@ <h3>Length</h3>
108109 < span class ="code-keyword "> return</ span > longest
109110 </ div >
110111 </ div >
112+ </ div >
111113 </ div >
112114
113115 < script src ="../../shared/js/visualizer.js "> </ script >
You can’t perform that action at this time.
0 commit comments