Search Results


5 matches found for 'connected components'

Find a path in a maze from start to finish

Problem Given a 2D array which represents a maze, a start point, and an end point, find a path from the start point to the end point if it exists. Input maze: 2D boolean array of size greater than 1 x 1, where False represents a wall (not traversable) and True represents an empty space (traversable) start: an object with x, y coordinates end: an object with x, y coordinates Approach The key to solving this problem is DFS.


Algorithm Handbook

... and average-case. Graphs Undirected (Simple Graph) DFS/BFS allows you to easily find connected components. This is useful for things like photoshop color fills, where each pixel in an image represents a vertex and edges are connected to all adjacent pixels.


React HOC vs. Hooks

HOC React HOC (Higher Order Components) are basically a function that takes a component and returns a new component. props are passed in as an argument to this function. React HOCs are generally used for: Components that share a common layout Components that need to be connected to some middleware (i.


Data stores in Software Architectures

Use Cases There are many ways to store your data. In this article we'll walk through some examples of data storage in common system designs. Reminder: There is no single best storage choice and they may vary heavily depending on things such as access patterns and scale.


Web Development 101

HTTP vs. HTTPS HTTP stands for Hypertext Transfer Protocol. It typically runs on TCP port 80. It is a protocol for sending data through browsers in the form of webpages and such. One major flaw with HTTP is that it is vulnerable to man in the middle attacks.