{treeSize}
+Nodes
+{treeHeight}
+Height
+• Each node has at most two children
+• Left subtree ≤ parent ≤ right subtree
+• Height determines tree balance
+• In-order traversal gives sorted sequence
+{currentStep.message}
+{treeHeight}
Height
diff --git a/src/data/changelog.ts b/src/data/changelog.ts index 6116746..3556bca 100644 --- a/src/data/changelog.ts +++ b/src/data/changelog.ts @@ -11,6 +11,39 @@ export interface ChangelogEntry { } export const changelog: ChangelogEntry[] = [ + { + version: "1.3.0", + date: "2025-09-28", + title: "Binary Tree Implementation", + description: + "Added comprehensive binary tree data structure with complete operations and interactive hierarchical visualization.", + changes: [ + { + type: "feature", + description: "Binary Tree Data Structure", + details: + "Complete binary tree implementation with insert, delete, and search operations featuring hierarchical node visualization with proper tree positioning and connections.", + }, + { + type: "feature", + description: "Interactive Binary Tree Visualizer", + details: + "Visual representation of binary tree nodes with SVG-based rendering, animated connections, and state-based color coding for operations including root highlighting.", + }, + { + type: "feature", + description: "Tree Statistics and Analytics", + details: + "Comprehensive tree metrics including node count, tree height, operation counters, and educational tree properties with real-time updates.", + }, + { + type: "improvement", + description: "Enhanced Navigation and Structure Gallery", + details: + "Updated data structures page with binary tree inclusion, corrected statistics (4 total structures, 1 tree structure), and integrated learning path.", + }, + ], + }, { version: "1.2.0", date: "2025-08-26", From a3df5d22498af56557d66867cb8d6b647feecad1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 10 Oct 2025 12:19:38 +0000 Subject: [PATCH 5/5] rebase: incorporate main branch changes (selection sort fix and React strict mode) Co-authored-by: EvolutionX-10 <85353424+EvolutionX-10@users.noreply.github.com> --- next.config.ts | 1 + src/components/selection/visualizer.tsx | 12 ++---------- src/data/changelog.ts | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/next.config.ts b/next.config.ts index 9a91ed1..fb7f70f 100644 --- a/next.config.ts +++ b/next.config.ts @@ -14,6 +14,7 @@ const withSerwist = withSerwistInit({ const nextConfig: NextConfig = { devIndicators: false, pageExtensions: ["js", "jsx", "ts", "tsx", "md", "mdx"], + reactStrictMode: false }; const withMDX = createMDX({ diff --git a/src/components/selection/visualizer.tsx b/src/components/selection/visualizer.tsx index 0ff60d9..7b0c895 100644 --- a/src/components/selection/visualizer.tsx +++ b/src/components/selection/visualizer.tsx @@ -59,11 +59,7 @@ export default function Visualizer() { if (nextStepData.comparingIndex !== -1) { setComparisons((prev) => prev + 1); } - if ( - prevIndex > 0 && - nextStepData.currentIndex !== steps[prevIndex].currentIndex && - nextStepData.minIndex !== nextStepData.currentIndex - ) { + if (prevIndex > 0 && nextStepData.sortedIndices.length !== steps[prevIndex].sortedIndices.length) { setSwaps((prev) => prev + 1); } return prevIndex + 1; @@ -98,11 +94,7 @@ export default function Visualizer() { if (nextStepData.comparingIndex !== -1) { setComparisons((prev) => prev + 1); } - if ( - prevIndex > 0 && - nextStepData.currentIndex !== steps[prevIndex].currentIndex && - nextStepData.minIndex !== nextStepData.currentIndex - ) { + if (prevIndex > 0 && nextStepData.sortedIndices.length !== steps[prevIndex].sortedIndices.length) { setSwaps((prev) => prev + 1); } return prevIndex + 1; diff --git a/src/data/changelog.ts b/src/data/changelog.ts index 3556bca..dc9c37c 100644 --- a/src/data/changelog.ts +++ b/src/data/changelog.ts @@ -44,6 +44,25 @@ export const changelog: ChangelogEntry[] = [ }, ], }, + { + version: "1.2.1", + date: "2025-10-10", + title: "Selection Sort Bug Fix", + description: "Fixed swap counter accuracy in selection sort visualizer and disabled React strict mode.", + changes: [ + { + type: "bugfix", + description: "Selection Sort Swap Counter", + details: + "Fixed swap counter logic to accurately track swaps by detecting when new elements are added to sorted indices, replacing incorrect condition that was miscounting swaps.", + }, + { + type: "improvement", + description: "Disabled React Strict Mode", + details: "Turned off React strict mode to prevent double-rendering issues in development environment.", + }, + ], + }, { version: "1.2.0", date: "2025-08-26",