+
+
+
+
+
{/* Overview Section */}
@@ -254,6 +281,7 @@ const content = () => {
+
);
};
diff --git a/app/visualizer/linkedList/types/circular/animation.jsx b/app/visualizer/linkedList/types/circular/animation.jsx
index da8d8ca..150d933 100755
--- a/app/visualizer/linkedList/types/circular/animation.jsx
+++ b/app/visualizer/linkedList/types/circular/animation.jsx
@@ -103,7 +103,7 @@ const CircularLinkedListVisualizer = () => {
Circular Linked List
-
+
Visualize Circular Linked List Operations
diff --git a/app/visualizer/linkedList/types/circular/content.jsx b/app/visualizer/linkedList/types/circular/content.jsx
index 275e539..72133fc 100755
--- a/app/visualizer/linkedList/types/circular/content.jsx
+++ b/app/visualizer/linkedList/types/circular/content.jsx
@@ -1,4 +1,28 @@
+"use client";
+import { useEffect, useState } from "react";
+import NewsletterEmbed from "@/app/components/ui/NewsletterEmbed";
+
const content = () => {
+
+ const [theme, setTheme] = useState("light");
+
+ useEffect(() => {
+ const updateTheme = () => {
+ const savedTheme = localStorage.getItem("theme") || "light";
+ setTheme(savedTheme);
+ };
+
+ updateTheme();
+
+ window.addEventListener("storage", updateTheme);
+ window.addEventListener("themeChange", updateTheme);
+
+ return () => {
+ window.removeEventListener("storage", updateTheme);
+ window.removeEventListener("themeChange", updateTheme);
+ };
+ }, []);
+
const overview = [
`A Circular Linked List is a variation of a linked list where the last node points back to the first node instead of containing a null reference. This creates a circular structure that can be traversed indefinitely.`,
`Circular linked lists can be either singly linked (each node has one pointer) or doubly linked (each node has two pointers). The circular nature enables continuous traversal and is particularly useful in round-robin scheduling and buffer implementations.`,
@@ -70,8 +94,11 @@ const content = () => {
];
return (
-
-
+
+
+
+
+
{/* Overview Section */}
@@ -291,6 +318,7 @@ const content = () => {
+
);
};
diff --git a/app/visualizer/linkedList/types/doubly/animation.jsx b/app/visualizer/linkedList/types/doubly/animation.jsx
index b6cb408..b36c79b 100755
--- a/app/visualizer/linkedList/types/doubly/animation.jsx
+++ b/app/visualizer/linkedList/types/doubly/animation.jsx
@@ -73,7 +73,7 @@ const DoublyLinkedListVisualizer = () => {
Doubly Linked List
-
+
Visualize Singly Linked List Operations
diff --git a/app/visualizer/linkedList/types/doubly/content.jsx b/app/visualizer/linkedList/types/doubly/content.jsx
index 41b217b..7c7ebe0 100755
--- a/app/visualizer/linkedList/types/doubly/content.jsx
+++ b/app/visualizer/linkedList/types/doubly/content.jsx
@@ -1,4 +1,28 @@
+"use client";
+import { useEffect, useState } from "react";
+import NewsletterEmbed from "@/app/components/ui/NewsletterEmbed";
+
const content = () => {
+
+ const [theme, setTheme] = useState("light");
+
+ useEffect(() => {
+ const updateTheme = () => {
+ const savedTheme = localStorage.getItem("theme") || "light";
+ setTheme(savedTheme);
+ };
+
+ updateTheme();
+
+ window.addEventListener("storage", updateTheme);
+ window.addEventListener("themeChange", updateTheme);
+
+ return () => {
+ window.removeEventListener("storage", updateTheme);
+ window.removeEventListener("themeChange", updateTheme);
+ };
+ }, []);
+
const overview = [
`A Doubly Linked List is an advanced variation of the linked list where each node contains data and two pointers - one to the next node and another to the previous node. This bidirectional linkage enables traversal in both directions.`,
`The list maintains head and tail pointers, allowing O(1) operations at both ends. Each node's previous pointer forms the backward chain, while the next pointer forms the forward chain.`,
@@ -107,8 +131,11 @@ const content = () => {
];
return (
-
-
+
+
+
+
+
{/* Overview Section */}
@@ -330,6 +357,7 @@ const content = () => {
+
);
};
diff --git a/app/visualizer/linkedList/types/singly/content.jsx b/app/visualizer/linkedList/types/singly/content.jsx
index 72bd1a5..e2c6732 100755
--- a/app/visualizer/linkedList/types/singly/content.jsx
+++ b/app/visualizer/linkedList/types/singly/content.jsx
@@ -1,6 +1,29 @@
"use client";
+import { useEffect, useState } from "react";
+import NewsletterEmbed from "@/app/components/ui/NewsletterEmbed";
+
const content = () => {
+
+ const [theme, setTheme] = useState("light");
+
+ useEffect(() => {
+ const updateTheme = () => {
+ const savedTheme = localStorage.getItem("theme") || "light";
+ setTheme(savedTheme);
+ };
+
+ updateTheme();
+
+ window.addEventListener("storage", updateTheme);
+ window.addEventListener("themeChange", updateTheme);
+
+ return () => {
+ window.removeEventListener("storage", updateTheme);
+ window.removeEventListener("themeChange", updateTheme);
+ };
+ }, []);
+
const overview = [
`A Singly Linked List is a linear data structure where each element (node) contains data and a pointer to the next node. Unlike arrays, linked lists don't have fixed sizes and allow efficient insertion/deletion at any position.`,
`The list maintains a head pointer that points to the first node. The last node's next pointer is null, indicating the end of the list. This structure provides O(1) insertion/deletion at the head but O(n) access time for arbitrary elements.`,
@@ -87,8 +110,11 @@ const content = () => {
];
return (
-
-
+
+
+
+
+
{/* Overview Section */}
@@ -281,6 +307,7 @@ const content = () => {
+
);
};
diff --git a/app/visualizer/linkedList/types/singly/page.jsx b/app/visualizer/linkedList/types/singly/page.jsx
index aed7df8..f9b457c 100755
--- a/app/visualizer/linkedList/types/singly/page.jsx
+++ b/app/visualizer/linkedList/types/singly/page.jsx
@@ -75,7 +75,7 @@ export default function Page() {
-
+
diff --git a/app/visualizer/queue/implementation/array/content.jsx b/app/visualizer/queue/implementation/array/content.jsx
index f513ba9..69c13b3 100755
--- a/app/visualizer/queue/implementation/array/content.jsx
+++ b/app/visualizer/queue/implementation/array/content.jsx
@@ -1,6 +1,7 @@
"use client";
import { useEffect, useState } from "react";
import DailyDSAEmbed from "@/app/components/ui/DailyDSAEmbed";
+import NewsletterEmbed from "@/app/components/ui/NewsletterEmbed";
const content = () => {
const [theme, setTheme] = useState("light");
@@ -93,10 +94,12 @@ const content = () => {
];
return (
-
-
-
-
+
+
+
+
+
+
{/* Queue Array Implementation Overview */}
@@ -230,8 +233,7 @@ const content = () => {
-
- {/* Mobile iframe at bottom */}
+
);
diff --git a/app/visualizer/queue/implementation/array/page.jsx b/app/visualizer/queue/implementation/array/page.jsx
index 7e8452c..cc8b02d 100755
--- a/app/visualizer/queue/implementation/array/page.jsx
+++ b/app/visualizer/queue/implementation/array/page.jsx
@@ -72,7 +72,7 @@ export default function Page() {
-
+
diff --git a/app/visualizer/queue/implementation/linkedList/content.jsx b/app/visualizer/queue/implementation/linkedList/content.jsx
index dbdc868..6981672 100755
--- a/app/visualizer/queue/implementation/linkedList/content.jsx
+++ b/app/visualizer/queue/implementation/linkedList/content.jsx
@@ -1,6 +1,7 @@
"use client";
import { useEffect, useState } from "react";
import DailyDSAEmbed from "@/app/components/ui/DailyDSAEmbed";
+import NewsletterEmbed from "@/app/components/ui/NewsletterEmbed";
const content = () => {
const [theme, setTheme] = useState("light");
@@ -67,11 +68,12 @@ const content = () => {
];
return (
-
-
+
+
+
-
+
{/* Queue Linked List Implementation Overview */}
@@ -190,8 +192,7 @@ const content = () => {
-
- {/* Mobile iframe at bottom */}
+
);
diff --git a/app/visualizer/queue/implementation/linkedList/page.jsx b/app/visualizer/queue/implementation/linkedList/page.jsx
index 3af6eb3..5b90d6c 100755
--- a/app/visualizer/queue/implementation/linkedList/page.jsx
+++ b/app/visualizer/queue/implementation/linkedList/page.jsx
@@ -73,7 +73,7 @@ export default function Page() {
-
+
diff --git a/app/visualizer/queue/operations/enqueue-dequeue/content.jsx b/app/visualizer/queue/operations/enqueue-dequeue/content.jsx
index e273eea..0e87bd8 100755
--- a/app/visualizer/queue/operations/enqueue-dequeue/content.jsx
+++ b/app/visualizer/queue/operations/enqueue-dequeue/content.jsx
@@ -2,6 +2,7 @@
import ComplexityGraph from "@/app/components/ui/graph";
import { useEffect, useState } from "react";
import DailyDSAEmbed from "@/app/components/ui/DailyDSAEmbed";
+import NewsletterEmbed from "@/app/components/ui/NewsletterEmbed";
const content = () => {
const [theme, setTheme] = useState('light');
@@ -61,11 +62,12 @@ const content = () => {
];
return (
-
-
+
+
+
-
+
{/* What is a Queue? */}
@@ -219,8 +221,7 @@ const content = () => {
-
- {/* Mobile iframe at bottom */}
+
);
diff --git a/app/visualizer/queue/operations/enqueue-dequeue/page.jsx b/app/visualizer/queue/operations/enqueue-dequeue/page.jsx
index 7167457..adec238 100755
--- a/app/visualizer/queue/operations/enqueue-dequeue/page.jsx
+++ b/app/visualizer/queue/operations/enqueue-dequeue/page.jsx
@@ -74,7 +74,7 @@ export default function Page() {
-
+
diff --git a/app/visualizer/queue/operations/isempty/content.jsx b/app/visualizer/queue/operations/isempty/content.jsx
index 6461eb7..d9d1ebe 100755
--- a/app/visualizer/queue/operations/isempty/content.jsx
+++ b/app/visualizer/queue/operations/isempty/content.jsx
@@ -1,6 +1,7 @@
"use client";
import { useEffect, useState } from "react";
import DailyDSAEmbed from "@/app/components/ui/DailyDSAEmbed";
+import NewsletterEmbed from "@/app/components/ui/NewsletterEmbed";
const content = () => {
const [theme, setTheme] = useState("light");
@@ -69,11 +70,12 @@ const content = () => {
];
return (
-
-
+
+
+
-
+
{/* What is the isEmpty Operation? */}
@@ -242,8 +244,7 @@ const content = () => {
-
- {/* Mobile iframe at bottom */}
+
);
diff --git a/app/visualizer/queue/operations/isempty/page.jsx b/app/visualizer/queue/operations/isempty/page.jsx
index eda3c6d..ce403e8 100755
--- a/app/visualizer/queue/operations/isempty/page.jsx
+++ b/app/visualizer/queue/operations/isempty/page.jsx
@@ -71,7 +71,7 @@ export default function Page() {
-
+
diff --git a/app/visualizer/queue/operations/isfull/content.jsx b/app/visualizer/queue/operations/isfull/content.jsx
index bbe2470..5a5a880 100755
--- a/app/visualizer/queue/operations/isfull/content.jsx
+++ b/app/visualizer/queue/operations/isfull/content.jsx
@@ -1,6 +1,7 @@
"use client";
import { useEffect, useState } from "react";
import DailyDSAEmbed from "@/app/components/ui/DailyDSAEmbed";
+import NewsletterEmbed from "@/app/components/ui/NewsletterEmbed";
const content = () => {
const [theme, setTheme] = useState("light");
@@ -79,11 +80,12 @@ const content = () => {
];
return (
-
-
+
+
+
-
+
{/* What is the isFull Operation? */}
@@ -258,8 +260,7 @@ const content = () => {
-
- {/* Mobile iframe at bottom */}
+
);
diff --git a/app/visualizer/queue/operations/isfull/page.jsx b/app/visualizer/queue/operations/isfull/page.jsx
index 2b0d03d..7cb1cad 100755
--- a/app/visualizer/queue/operations/isfull/page.jsx
+++ b/app/visualizer/queue/operations/isfull/page.jsx
@@ -71,7 +71,7 @@ export default function page() {
-
+
diff --git a/app/visualizer/queue/operations/peek-front/content.jsx b/app/visualizer/queue/operations/peek-front/content.jsx
index 2c2981e..0ec8ef2 100755
--- a/app/visualizer/queue/operations/peek-front/content.jsx
+++ b/app/visualizer/queue/operations/peek-front/content.jsx
@@ -1,6 +1,7 @@
"use client";
import { useEffect, useState } from "react";
import DailyDSAEmbed from "@/app/components/ui/DailyDSAEmbed";
+import NewsletterEmbed from "@/app/components/ui/NewsletterEmbed";
const content = () => {
const [theme, setTheme] = useState("light");
@@ -65,11 +66,12 @@ const content = () => {
];
return (
-
-
+
+
+
-
+
{/* What is Peek Front Operation? */}
@@ -230,8 +232,7 @@ const content = () => {
-
- {/* Mobile iframe at bottom */}
+