-
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathdata-structures.html
More file actions
358 lines (333 loc) · 30.5 KB
/
data-structures.html
File metadata and controls
358 lines (333 loc) · 30.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="images/logo.png">
<link rel="apple-touch-icon" href="images/logo.png">
<title>Data Structures - DevDunia</title>
<meta name="description" content="Learn data structures with definitions, syntax, and examples. Arrays, linked lists, trees, graphs, sorting algorithms and more.">
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="sidebar.css">
<style>
body {
background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}
</style>
</head>
<body class="min-h-screen">
<!-- Background: Consistent Subtle Dark Gradient -->
<div class="fixed inset-0 -z-10 bg-gradient-to-br from-gray-900 via-slate-900 to-gray-900"></div>
<!-- Sidebar Container -->
<div id="sidebar-container"></div>
<!-- Main Content -->
<div class="main-content">
<div class="relative z-10 container mx-auto px-4 pt-16 pb-24 sm:px-6 lg:px-8">
<!-- Header -->
<div class="text-center mb-12">
<h1 class="text-3xl sm:text-4xl font-bold mb-4 tracking-tight
text-transparent bg-clip-text bg-gradient-to-r from-emerald-400 to-teal-500">
Data Structures
</h1>
<p class="text-lg text-gray-400 max-w-2xl mx-auto">
Learn data structures with definitions, syntax, and practical examples. Essential for coding interviews and algorithm design.
</p>
</div>
<!-- Main Content -->
<div class="max-w-6xl mx-auto">
<!-- Basic Data Structures -->
<div class="mb-12">
<h2 class="text-2xl font-semibold text-white mb-8">Basic Data Structures</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Array -->
<a href="datastructures/array-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-emerald-500/10 hover:border-emerald-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-emerald-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 10h16M4 14h16M4 18h16"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-emerald-300 transition-colors">Array</h3>
</div>
<p class="text-gray-400 text-sm">Fixed-size collection of elements with contiguous memory allocation.</p>
</a>
<!-- Linked List -->
<a href="datastructures/linkedlist-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-emerald-500/10 hover:border-emerald-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-emerald-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-emerald-300 transition-colors">Linked List</h3>
</div>
<p class="text-gray-400 text-sm">Linear data structure with nodes connected by pointers.</p>
</a>
<!-- Stack -->
<a href="datastructures/stack-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-emerald-500/10 hover:border-emerald-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-emerald-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-emerald-300 transition-colors">Stack</h3>
</div>
<p class="text-gray-400 text-sm">LIFO (Last In, First Out) data structure with push and pop operations.</p>
</a>
<!-- Queue -->
<a href="datastructures/queue-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-emerald-500/10 hover:border-emerald-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-emerald-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 10h16M4 14h16M4 18h16"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-emerald-300 transition-colors">Queue</h3>
</div>
<p class="text-gray-400 text-sm">FIFO (First In, First Out) data structure with enqueue and dequeue operations.</p>
</a>
<!-- Hash Table -->
<a href="hashtable-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-emerald-500/10 hover:border-emerald-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-emerald-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-emerald-300 transition-colors">Hash Table</h3>
</div>
<p class="text-gray-400 text-sm">Key-value pairs with O(1) average time complexity for operations.</p>
</a>
<!-- Tree -->
<a href="tree-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-emerald-500/10 hover:border-emerald-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-emerald-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-emerald-300 transition-colors">Tree</h3>
</div>
<p class="text-gray-400 text-sm">Hierarchical data structure with nodes and edges, no cycles.</p>
</a>
</div>
</div>
<!-- Advanced Data Structures -->
<div class="mb-12">
<h2 class="text-2xl font-semibold text-white mb-8">Advanced Data Structures</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Binary Search Tree -->
<a href="bst-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-blue-500/10 hover:border-blue-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-blue-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-blue-300 transition-colors">Binary Search Tree</h3>
</div>
<p class="text-gray-400 text-sm">Binary tree with left child < parent < right child property.</p>
</a>
<!-- Heap -->
<a href="heap-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-blue-500/10 hover:border-blue-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-blue-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-blue-300 transition-colors">Heap</h3>
</div>
<p class="text-gray-400 text-sm">Complete binary tree with heap property (min or max heap).</p>
</a>
<!-- Graph -->
<a href="graph-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-blue-500/10 hover:border-blue-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-blue-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-blue-300 transition-colors">Graph</h3>
</div>
<p class="text-gray-400 text-sm">Vertices and edges, can be directed or undirected, weighted or unweighted.</p>
</a>
<!-- Trie -->
<a href="trie-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-blue-500/10 hover:border-blue-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-blue-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-blue-300 transition-colors">Trie</h3>
</div>
<p class="text-gray-400 text-sm">Tree-like data structure for storing strings, efficient for prefix searches.</p>
</a>
<!-- Segment Tree -->
<a href="segment-tree-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-blue-500/10 hover:border-blue-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-blue-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 10h16M4 14h16M4 18h16"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-blue-300 transition-colors">Segment Tree</h3>
</div>
<p class="text-gray-400 text-sm">Tree data structure for range queries and updates in O(log n).</p>
</a>
<!-- Fenwick Tree -->
<a href="fenwick-tree-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-blue-500/10 hover:border-blue-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-blue-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-blue-300 transition-colors">Fenwick Tree</h3>
</div>
<p class="text-gray-400 text-sm">Binary Indexed Tree for efficient prefix sum queries and updates.</p>
</a>
</div>
</div>
<!-- Sorting Algorithms -->
<div class="mb-12">
<h2 class="text-2xl font-semibold text-white mb-8">Sorting Algorithms</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Quick Sort -->
<a href="quicksort-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-purple-500/10 hover:border-purple-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-purple-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-purple-300 transition-colors">Quick Sort</h3>
</div>
<p class="text-gray-400 text-sm">Divide and conquer algorithm with O(n log n) average case.</p>
</a>
<!-- Merge Sort -->
<a href="mergesort-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-purple-500/10 hover:border-purple-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-purple-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-purple-300 transition-colors">Merge Sort</h3>
</div>
<p class="text-gray-400 text-sm">Stable sorting algorithm with guaranteed O(n log n) time complexity.</p>
</a>
<!-- Heap Sort -->
<a href="heapsort-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-purple-500/10 hover:border-purple-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-purple-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-purple-300 transition-colors">Heap Sort</h3>
</div>
<p class="text-gray-400 text-sm">In-place sorting using heap data structure, O(n log n) time complexity.</p>
</a>
<!-- Bubble Sort -->
<a href="bubblesort-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-purple-500/10 hover:border-purple-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-purple-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-purple-300 transition-colors">Bubble Sort</h3>
</div>
<p class="text-gray-400 text-sm">Simple comparison-based algorithm, O(n²) time complexity.</p>
</a>
<!-- Insertion Sort -->
<a href="insertionsort-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-purple-500/10 hover:border-purple-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-purple-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 100 4m0-4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 100 4m0-4v2m0-6V4"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-purple-300 transition-colors">Insertion Sort</h3>
</div>
<p class="text-gray-400 text-sm">Efficient for small datasets, O(n²) worst case, O(n) best case.</p>
</a>
<!-- Selection Sort -->
<a href="selectionsort-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-purple-500/10 hover:border-purple-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-purple-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-purple-300 transition-colors">Selection Sort</h3>
</div>
<p class="text-gray-400 text-sm">Finds minimum element and swaps, O(n²) time complexity.</p>
</a>
</div>
</div>
<!-- Search Algorithms -->
<div class="mb-12">
<h2 class="text-2xl font-semibold text-white mb-8">Search Algorithms</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Binary Search -->
<a href="binarysearch-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-cyan-500/10 hover:border-cyan-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-cyan-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-cyan-300 transition-colors">Binary Search</h3>
</div>
<p class="text-gray-400 text-sm">Search in sorted array with O(log n) time complexity.</p>
</a>
<!-- Linear Search -->
<a href="linearsearch-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-cyan-500/10 hover:border-cyan-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-cyan-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-cyan-300 transition-colors">Linear Search</h3>
</div>
<p class="text-gray-400 text-sm">Sequential search through array, O(n) time complexity.</p>
</a>
<!-- Depth First Search -->
<a href="dfs-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-cyan-500/10 hover:border-cyan-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-cyan-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-cyan-300 transition-colors">Depth First Search</h3>
</div>
<p class="text-gray-400 text-sm">Graph traversal algorithm using stack or recursion.</p>
</a>
<!-- Breadth First Search -->
<a href="bfs-ds.html" class="group bg-slate-800/70 backdrop-blur-md rounded-lg shadow-md border border-slate-700/60 p-6 transition-all duration-300 ease-out hover:shadow-lg hover:shadow-cyan-500/10 hover:border-cyan-600/70 hover:-translate-y-1">
<div class="flex items-center space-x-3 mb-3">
<div class="w-10 h-10 bg-cyan-600 rounded-lg flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path>
</svg>
</div>
<h3 class="text-lg font-semibold text-white group-hover:text-cyan-300 transition-colors">Breadth First Search</h3>
</div>
<p class="text-gray-400 text-sm">Graph traversal algorithm using queue, finds shortest path.</p>
</a>
</div>
</div>
</div>
</div>
</div>
<!-- Sidebar Scripts -->
<script src="sidebar-include.js"></script>
<script src="sidebar.js"></script>
</body>
</html>