Sparse Matrix Implementation with Python

A matrix is a two-dimensional data object made of m rows and n columns, therefore having total m x n values. If most of the elements of the matrix have 0 value, then it is called a sparse matrix. Representing a sparse matrix by a 2D array leads to wastage of lots of memory as zeroes in the matrix are of no use in most of the cases.

Imagine that you are asked to represent the connections between 1000 components on an electronic circuit board in a program. Perhaps there are conductive wires between some of the components, and we are storing the distance of each…




Data Structures and Algorithms is a general topic that contains hundreds of various problems that you may encounter or need to implement in any software project. In this publication, I aim to introduce some algorithm problems and explain my implementations using these structures.

Recommended from Medium

Top 6 Reasons to Choose Postman for API Testing

How to reset admin password in django

Why We Disable Linux’s THP Feature for Databases

Prometheus With AlertManager

Three Takeaways from Amazon CTO’s Keynote at AWS Reinvent 2020

The Software Engine

Creating a serverless static website

Build and publish Docker images with GitHub Actions

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Yağmur Çiğdem Aktaş

Yağmur Çiğdem Aktaşğmur-cigdem-aktas You can reach all the codes used in my posts from this github link!

More from Medium

Multi-category classification of various chest conditions from chest x-rays

PyTorch quick reference — Tensors

U-NET Architecture Explained and Implementation


Machine Learning …Definitions And Appl