Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions .agents/mcp_config.json

This file was deleted.

5 changes: 1 addition & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "interactive",
"mcp.servers.data-agent-kit.enabled": false,
"mcp.servers.notebooks.enabled": false,
"mcp.servers.visualization.enabled": false
"java.configuration.updateBuildConfiguration": "interactive"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class PathfindingAlgorithmsTest {

private final SimulationService simulationService = new SimulationService();
private final List<String> algorithms =
List.of("BFS", "DFS", "Dijkstra", "A* Search", "Bidirectional BFS");
List.of("BFS", "DFS", "Dijkstra", "A* Search", "Bidirectional BFS", "Jump Point Search");

@Test
@DisplayName("Verify pathfinding models find path in unblocked grid")
Expand Down
113 changes: 13 additions & 100 deletions frontend/src/components/AlgorithmMatrix.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { useState } from 'react';
import { Play, Search, ShieldCheck, Sparkles } from 'lucide-react';
import { BigOGraph } from './BigOGraph';

export interface AlgorithmItem {
id: string;
name: string;
category: 'sorting' | 'searching' | 'pathfinding' | 'dp' | 'trees';
category: 'sorting' | 'searching' | 'pathfinding';
categoryLabel: string;
bestTime: string;
avgTime: string;
Expand Down Expand Up @@ -238,101 +237,29 @@ const ALGORITHM_DATA: AlgorithmItem[] = [
space: 'O(V)',
description: 'Recursive stack-based exploration traversing deepest branch vertices.',
},

// Dynamic Programming
{
id: 'knapsack',
name: '0/1 Knapsack Problem',
category: 'dp',
categoryLabel: 'DP Arena',
bestTime: 'O(n·W)',
avgTime: 'O(n·W)',
worstTime: 'O(n·W)',
space: 'O(n·W)',
description: '2D table memoization to select optimal subsets of weighted items without exceeding capacity.',
},
{
id: 'lcs',
name: 'Longest Common Subsequence (LCS)',
category: 'dp',
categoryLabel: 'DP Arena',
bestTime: 'O(m·n)',
avgTime: 'O(m·n)',
worstTime: 'O(m·n)',
space: 'O(m·n)',
description: 'Finds the longest subsequence present in both strings in the same relative order.',
},
{
id: 'editdistance',
name: 'Edit Distance (Levenshtein)',
category: 'dp',
categoryLabel: 'DP Arena',
bestTime: 'O(m·n)',
avgTime: 'O(m·n)',
worstTime: 'O(m·n)',
space: 'O(m·n)',
description: 'Computes the minimum number of insertions, deletions, and replacements to convert one string to another.',
},

// Tree Structures
{
id: 'bst',
name: 'Binary Search Tree (BST)',
category: 'trees',
categoryLabel: 'Tree Arena',
bestTime: 'O(log n)',
avgTime: 'O(log n)',
worstTime: 'O(n)',
space: 'O(n)',
description: 'Hierarchical node structure maintaining left-smaller and right-greater invariants.',
},
{
id: 'avl',
name: 'AVL Tree (Self-Balancing)',
category: 'trees',
categoryLabel: 'Tree Arena',
bestTime: 'O(log n)',
avgTime: 'O(log n)',
worstTime: 'O(log n)',
space: 'O(n)',
description: 'Strictly height-balanced BST guaranteeing O(log n) lookups via single and double rotations.',
},
{
id: 'redblack',
name: 'Red-Black Tree',
category: 'trees',
categoryLabel: 'Tree Arena',
bestTime: 'O(log n)',
avgTime: 'O(log n)',
worstTime: 'O(log n)',
space: 'O(n)',
description: 'Self-balancing binary tree using color properties to ensure near-optimal height during updates.',
},
];

interface Props {
onNavigate: (category: 'sorting' | 'searching' | 'pathfinding' | 'dp' | 'trees') => void;
onNavigate: (category: 'sorting' | 'searching' | 'pathfinding') => void;
}

export function AlgorithmMatrix({ onNavigate }: Props) {
const [filterCategory, setFilterCategory] = useState<'all' | 'sorting' | 'searching' | 'pathfinding' | 'dp' | 'trees'>('all');
const [filterCategory, setFilterCategory] = useState<'all' | 'sorting' | 'searching' | 'pathfinding'>('all');
const [searchQuery, setSearchQuery] = useState('');
const [hoveredComplexity, setHoveredComplexity] = useState<string | undefined>(undefined);

const filteredAlgorithms = ALGORITHM_DATA.filter((item) => {
const matchesCategory = filterCategory === 'all' || item.category === filterCategory;
const matchesSearch =
item.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
item.description.toLowerCase().includes(searchQuery.toLowerCase()) ||
item.categoryLabel.toLowerCase().includes(searchQuery.toLowerCase());
item.description.toLowerCase().includes(searchQuery.toLowerCase());
return matchesCategory && matchesSearch;
});

const getComplexityClass = (complexity: string) => {
if (complexity.includes('1') || complexity.includes('log n') || complexity.includes('√n') || complexity.includes('log3 n') || complexity.includes('log log n')) {
if (complexity.includes('1') || complexity.includes('log n') || complexity.includes('√n')) {
return 'badge-complexity-optimal';
}
if (complexity.includes('n log n') || complexity.includes('V + E') || complexity.includes('(V + E) log V') || complexity.includes('V log V')) {
if (complexity.includes('n log n') || complexity.includes('V + E')) {
return 'badge-complexity-good';
}
return 'badge-complexity-heavy';
Expand All @@ -345,35 +272,26 @@ export function AlgorithmMatrix({ onNavigate }: Props) {
<Sparkles size={14} className="text-amber-400" />
<span>ALGORITHM CATALOG & COMPLEXITY MATRIX</span>
</div>
<h2 className="matrix-title">Benchmark Directory & Asymptotic Curves</h2>
<h2 className="matrix-title">Benchmark Directory</h2>
<p className="matrix-subtitle">
Explore asymptotic time and space bounds across all 20+ supported competitive algorithm suites with live Big-O curve synchronization.
Explore asymptotic time and space bounds across supported competitive algorithm suites.
</p>

{/* Integrated Interactive Big-O Growth Curves */}
<div className="matrix-graph-container">
<BigOGraph highlightedComplexity={hoveredComplexity} />
</div>

<div className="matrix-controls">
<div className="category-filter-pills">
{(['all', 'sorting', 'searching', 'pathfinding', 'dp', 'trees'] as const).map((cat) => (
{(['all', 'sorting', 'searching', 'pathfinding'] as const).map((cat) => (
<button
key={cat}
className={`filter-pill ${filterCategory === cat ? 'active' : ''}`}
onClick={() => setFilterCategory(cat)}
>
{cat === 'all'
? 'All Suites'
? 'All Algorithms'
: cat === 'sorting'
? 'Sorting'
: cat === 'searching'
? 'Searching'
: cat === 'pathfinding'
? 'Pathfinding'
: cat === 'dp'
? 'Dynamic Programming'
: 'Tree Structures'}
: 'Pathfinding'}
</button>
))}
</div>
Expand All @@ -382,7 +300,7 @@ export function AlgorithmMatrix({ onNavigate }: Props) {
<Search size={16} className="search-icon" />
<input
type="text"
placeholder="Search algorithms, DP matrices, trees, or complexities..."
placeholder="Search algorithm or complexity..."
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
className="matrix-search-input"
Expand All @@ -406,12 +324,7 @@ export function AlgorithmMatrix({ onNavigate }: Props) {
</thead>
<tbody>
{filteredAlgorithms.map((algo) => (
<tr
key={algo.id}
className="matrix-row"
onMouseEnter={() => setHoveredComplexity(algo.avgTime)}
onMouseLeave={() => setHoveredComplexity(undefined)}
>
<tr key={algo.id} className="matrix-row">
<td className="cell-name">
<div className="algo-name-container">
<strong className="algo-title">{algo.name}</strong>
Expand Down
Loading
Loading