algorithms

Recent in

algorithms

How To Use Debounce in Next.js
nextjs

How To Use Debounce in Next.js

https://hackernoon.com

React v16.8 introduced a new hook called `useEffect, which allows you to run side effects in your functional components. UseEffect is a great way to handle expensive operations like API calls, but it can take some work. In this post, I'll show you how to use use useEffect` to debounce expensive procedures in Next.js. Debouncing is a technique for controlling the rate at which a function is called.

Imamuzzaki Abu SalamNov 20, 2022
Must-Know Theorems for Programmers
coding

Must-Know Theorems for Programmers

https://hackernoon.com

Programming is a complex and multifaceted field that encompasses a wide range of mathematical and computational concepts and techniques. From algorithms and data structures to complexity theory and formal languages, there are many important theorems and results that form the foundation of modern computer science.

Ishita JunejaFeb 22, 2023
Prim's Algorithm – Explained with a Pseudocode Example
Algorithms

Prim's Algorithm – Explained with a Pseudocode Example

https://www.freecodecamp.org

In Computer Science, Prim’s algorithm helps you find the minimum spanning tree of a graph. It is a greedy algorithm – meaning it selects the option available at the moment. In this article, I’ll show you the pseudocode representation of Prim’s algorithm.

Kolade ChrisFeb 14, 2023
How to Find the Longest Substring without Repeating Characters
java

How to Find the Longest Substring without Repeating Characters

https://hackernoon.com

The Longest Substring Without Repeating Characters is a problem where one needs to find the longest substring of a given string such that no characters in the substring repeat. This is a common problem in computer science and is often used to test a developer's understanding of data structures, algorithms, and string manipulation.

Leonid ZemenkovFeb 2, 2023
Taking a Look under the Hood to See How Jest Finds Related Tests
Detecting Linked List Cycle.
algorithms

Detecting Linked List Cycle.

https://hackernoon.com

Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, pos is used to denote the index of the node that tail's next pointer is connected to.

Aleksei KankovNov 16, 2022
KNN Algorithm – K-Nearest Neighbors Classifiers and Model Example
Algorithms

KNN Algorithm – K-Nearest Neighbors Classifiers and Model Example

https://www.freecodecamp.org

The K-Nearest Neighbors (K-NN) algorithm is a popular Machine Learning algorithm used mostly for solving classification problems. In this article, you'll learn how the K-NN algorithm works with practical examples. We'll use diagrams, as well sample data to show how you can classify data using the K-NN algorithm.

Ihechikara Vincent AbbaJan 25, 2023
Validate Binary Search Tree Blind 75 LeetCode Question
java

Validate Binary Search Tree Blind 75 LeetCode Question

https://hackernoon.com

BST is defined as follows: left subtree of a node contains only nodes with keys **less than** the node’s key. Right subtree contains only node with keys**greater than the key. Both the left and right subtrees must also be binary search trees.

Ruslan RakhmedovJan 18, 2023
A Beginner's Guide to Data Structures and Algorithms
programming

A Beginner's Guide to Data Structures and Algorithms

https://hackernoon.com

Data structures are a way of organizing and storing data so that it can be accessed and modified efficiently. Common data structures include arrays, lists, stacks, queues, trees, and graphs. Algorithms are sets of instructions for solving a specific problem.

Daniel YerimahJan 13, 2023
Java Algorithms: First Missing Positive (LeetCode)
programming

Java Algorithms: First Missing Positive (LeetCode)

https://hackernoon.com

Task description: Given an unsorted integer array, return the smallest missing positive integer. Solution: Brute force approach: Sort through all positive numbers from 1 until we find the first missing one.

Leonid ZemenkovJan 10, 2023
Newsletter

Let's keep in touch

Benefit from a weekly updates, coding challenges and helpful resources around software development.

Your privacy is important to us. We promise not to send you spam!