Article
Dictionaries are a very powerful, Pythonic way to store data. They allow us to associate a key with a value, and access them as needed. This makes it easy to store data where, for example, we need to associate a string with a number. For instance, if we need to...
Federico Trotta
One of the key aspects of Python is its ability to handle and manipulate different data structures efficiently. Among these data structures, tuples and dictionaries stand out as widely used and flexible options. Tuples are immutable, ordered collections of elements, enclosed in parentheses. On the other hand, dictionaries are unordered...
Dimitrije Stamenic
In the world of computer science, the concept of data structures stands as a foundational pillar, holding immense significance in the way we think about, organize, store, and access data. Out of many data structures, the list is arguably one of the most fundamental and versatile. Note: In many real-world...
What do you do when you have two or more tuples and you need to compare them? This may seem like a pretty straightforward thing to do, but when you scratch the surface, you'll find out that there's much more to it than you initially realize. Comparing tuples in Python...
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...
Anđela Niketić
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...
Graphs in Python can be represented in several different ways. The most notable ones are adjacency matrices, adjacency lists, and lists of edges. In this guide, we'll cover all of them. When implementing graphs, you can switch between these types of representations at your leisure. First of all, we'll quickly...
A graph is a great tool for modeling relationships between objects. Graphs can model complex relationships between any number of objects in a system, which makes them ideal for representing interactions between concepts/items in areas like physics, economics, chemistry. Thanks to constantly increasing computational power, you can manipulate graphs...
Kruskal's algorithm is one of the three most famous algorithms for finding a minimum spanning tree (MST) in a graph. MSTs are widely used to calculate optimal paths in a lot of different fields. From a post-office calculating the optimal path for a postman that needs to cover a certain...
© 2013-2024 Stack Abuse. All rights reserved.