React Custom Hook for API
<h3>πΉ Overview</h3><p>React custom hooks help separate <strong>data fetching logic</strong> from UI components, keeping them clean and reusable.</p><hr><h3>πΉ Concept</h3><p>Custom hooks are just normal JavaScript functions that use Reactβs built-in hooks (<code>useState</code>, <code>useEffect</code>) internally.</p><p> </p><p> </p>
sorting in js
<p>Sorting means arranging elements in <strong>ascending or descending order</strong>.<br>Weβll implement a classic algorithm β <strong>Bubble Sort</strong> β for simplicity and understanding.</p><blockquote><p><strong>Idea:</strong> Repeatedly swap adjacent elements if they are in the wrong order.<br><strong>Time Complexity:</strong> O(nΒ²)<br><strong>Best For:</strong> Small datasets or learning basic sorting logic.</p></blockquote>
binary search js
<p>Binary Search is an efficient algorithm to find an element in a sorted array.<br>It works by repeatedly dividing the search interval in half:</p><p>Compare the target value to the middle element.</p><p>If they are equal β the search is successful.</p><p>If the target is smaller β continue searching in the left half.</p><p>If the target is larger β continue searching in the right half.</p><p>Time Complexity: O(log n)<br>Requirement: The array must be sorted.</p>
Hello World
<p>a simple <strong>βHello, World!β</strong> program in <strong>Python</strong></p>
