Skip to content

Commit f4c4c14

Browse files
authored
Merge pull request #42 from Sohan-Rout/main1
Feat : added new updates to stack implementation using array
2 parents 227532b + 85381fc commit f4c4c14

10 files changed

Lines changed: 324 additions & 297 deletions

File tree

app/visualizer/stack/implementation/usingArray/animation.jsx

Lines changed: 0 additions & 39 deletions
This file was deleted.

app/visualizer/stack/implementation/usingArray/codeBlock.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,10 @@ int main() {
420420
initial={{ opacity: 0, y: 20 }}
421421
animate={{ opacity: 1, y: 0 }}
422422
transition={{ duration: 0.3 }}
423-
className="bg-white dark:bg-gray-800 rounded-xl shadow-lg overflow-hidden border border-gray-200 dark:border-gray-700 transition-colors duration-300"
423+
className="bg-white dark:bg-neutral-950 rounded-xl shadow-lg overflow-hidden border border-gray-200 dark:border-gray-700 transition-colors duration-300"
424424
>
425425
{/* Header */}
426-
<div className="flex flex-col sm:flex-row justify-between items-start sm:items-center p-4 bg-gray-50 dark:bg-gray-700/50 border-b border-gray-200 dark:border-gray-700">
426+
<div className="flex flex-col sm:flex-row justify-between items-start sm:items-center p-4 bg-gray-50 dark:bg-neutral-950 border-b border-gray-200 dark:border-gray-700">
427427
<div className="flex items-center mb-2 sm:mb-0">
428428
<FaCode className="text-blue-500 mr-2 text-lg" />
429429
<h3 className="text-lg font-semibold text-gray-800 dark:text-white">

app/visualizer/stack/implementation/usingArray/content.jsx

Lines changed: 226 additions & 234 deletions
Large diffs are not rendered by default.
Lines changed: 94 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,104 @@
1-
import Animation from "@/app/visualizer/stack/implementation/usingArray/animation";
21
import Navbar from "@/app/components/navbarinner";
2+
import Breadcrumbs from "@/app/components/ui/Breadcrumbs";
3+
import ArticleActions from "@/app/components/ui/ArticleActions";
4+
import Content from "@/app/visualizer/stack/implementation/usingArray/content";
5+
import Code from "@/app/visualizer/stack/implementation/usingArray/codeBlock";
6+
import ModuleCard from "@/app/components/ui/ModuleCard";
7+
import { MODULE_MAPS } from "@/lib/modulesMap";
8+
import Footer from "@/app/components/footer";
9+
import ExploreOther from "@/app/components/ui/exploreOther";
10+
import BackToTopButton from "@/app/components/ui/backtotop";
311

412
export const metadata = {
5-
title: 'Stack Implementation using Array | Learn Stack in DSA with JS, C, Python, Java Code',
6-
description: 'Understand how to implement a Stack using an Array with visual explanations, animations, and complete code examples in JavaScript, C, Python, and Java. Perfect for DSA beginners and interview prep.',
13+
title:
14+
"Stack Implementation using Array | Learn Stack in DSA with JS, C, Python, Java Code",
15+
description:
16+
"Understand how to implement a Stack using an Array with visual explanations, animations, and complete code examples in JavaScript, C, Python, and Java. Perfect for DSA beginners and interview prep.",
717
keywords: [
8-
'Stack using Array',
9-
'Stack Implementation',
10-
'Stack Implementation in JavaScript',
11-
'Stack Implementation in C',
12-
'Stack Implementation in Python',
13-
'Stack Implementation in Java',
14-
'DSA Stack',
15-
'Array Stack',
16-
'Data Structures Stack',
17-
'Stack Push Pop Array',
18-
'Learn Stack DSA',
19-
'Visualize Stack Implementation',
20-
'Stack Code Examples',
18+
"Stack using Array",
19+
"Stack Implementation",
20+
"Stack Implementation in JavaScript",
21+
"Stack Implementation in C",
22+
"Stack Implementation in Python",
23+
"Stack Implementation in Java",
24+
"DSA Stack",
25+
"Array Stack",
26+
"Data Structures Stack",
27+
"Stack Push Pop Array",
28+
"Learn Stack DSA",
29+
"Visualize Stack Implementation",
30+
"Stack Code Examples",
2131
],
22-
robots: 'index, follow',
32+
robots: "index, follow",
33+
openGraph: {
34+
images: [
35+
{
36+
url: "/og/stack/stackArray.png",
37+
width: 1200,
38+
height: 630,
39+
alt: "Stack Implementation using Array",
40+
},
41+
],
42+
},
2343
};
2444

25-
export default function Page(){
26-
return(
45+
export default function Page() {
46+
const paths = [
47+
{ name: "Home", href: "/" },
48+
{ name: "Visualizer", href: "/visualizer" },
49+
{ name: "Stack : Implementation Using Array", href: "" },
50+
];
51+
52+
return (
2753
<>
28-
<Navbar/>
29-
<Animation/>
54+
<div>
55+
<Navbar />
56+
</div>
57+
58+
<div className="py-20 bg-gray-100 dark:bg-neutral-900 text-gray-800 dark:text-gray-200">
59+
<section className="px-6 md:px-12">
60+
<div className="mt-10 sm:mt-10 mb-4">
61+
<Breadcrumbs paths={paths} />
62+
</div>
63+
64+
<div className="flex items-center flex-col">
65+
<div className="flex">
66+
<p className="uppercase tracking-wide bg-green-500 dark:text-black px-4 py-1 mb-2 rounded-full">
67+
Stack
68+
</p>
69+
</div>
70+
<h1 className="text-4xl md:text-4xl font-bold text-center text-gray-900 dark:text-white mb-0">
71+
Implementation Using Array
72+
</h1>
73+
<ArticleActions />
74+
</div>
75+
<div className="bg-black border border-none dark:bg-gray-600 w-100 h-[2px] rounded-xl my-10"></div>
76+
<Content />
77+
</section>
78+
79+
<section className="px-6">
80+
<Code />
81+
</section>
82+
83+
<section className="px-6 md:px-12 my-12">
84+
<ModuleCard
85+
moduleId={MODULE_MAPS.stackArray}
86+
title="Stack Implementation using Array"
87+
description="Mark Stack using Array as done and view it on your dashboard"
88+
initialDone={false}
89+
/>
90+
</section>
91+
92+
<section>
93+
<ExploreOther
94+
title="Explore other implementation"
95+
links={[{ text: "Using Linked List", url: "./usingLinkedList" }]}
96+
/>
97+
</section>
98+
</div>
99+
100+
<BackToTopButton />
101+
<Footer />
30102
</>
31103
);
32-
};
104+
}

lib/modulesMap.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ export const MODULE_MAPS = {
1212
isFull : "54301ec9-0586-48f0-a6db-18a41adeb856",
1313
postfix : "ca3daf8d-23f8-4ade-adfd-4bd0a88d3da2",
1414
prefix : "a2971df4-5e48-4320-bc91-3de3242cac48",
15+
stackArray : "4e0dd1e0-a8c7-4066-845c-b5917383d5c2",
16+
stackLinkedList : "",
1517
}

public/DSAVisualizer.png

-433 KB
Binary file not shown.

public/modules/prefix.png

294 KB
Loading

public/modules/stackArray.png

154 KB
Loading

public/og.png

246 KB
Loading

public/og/stack/stackArray.png

154 KB
Loading

0 commit comments

Comments
 (0)