Graphs in Python: Breadth-First Search (BFS) Algorithm
Graphs are one of the most useful data structures. They can be used to model practically everything - object relations and networks being the most common ones. An image can be represented as a grid-like graph of pixels, and sentences can be represented as graphs of words. Graphs are used...
Python: Validate Email Address with Regular Expressions (RegEx)
Regular Expressions, or RegEx for short, are expressions of patterns that can be used for text search and replace actions, validations, string splitting, and much more. These patterns consist of characters, digits and special characters, in such a form that the pattern matches certain segments of text we're searching through....
Graphs in Python: Depth-First Search (DFS) Algorithm
Originating from mathematics, graphs are now widely used data structures in Computer Science. One of the first problems we encounter when constructing any algorithm regarding Graph processing or traversal, is how we represent the graph and then, how to traverse that representation. Graph traversal is not a trivial problem, and...
How to Compare Dates in Java
Dates are something we encounter in everyday life, whether they're used for calendars, scheduling appointments, or even remembering birthdays. Naturally, when working with dates we will often need to know if a certain date comes before or after another, or if they represent the same calendar date. In this article,...
Java: Check if String is a Number
Strings are a handy way of getting information across and getting input from a user. In this article, we will go through a couple of ways check if a String is Numeric in Java - that is to say, if a String represents a numeric value. Check if String is...