Aditya Varma has Published 35 Articles

Python Program to Accessing K Element in set without Deletion

Aditya Varma

Aditya Varma

Updated on 17-Aug-2023 18:52:14

33 Views

In Python, a set is an unordered collection of unique elements, represented by {}. It allows efficient membership testing and eliminates duplicate values, making it useful for tasks such as removing duplicates or checking for common elements between sets. In this article, we will learn how to access the K ... Read More

How to Reverse String Consonants without Affecting other Elements in Python

Aditya Varma

Aditya Varma

Updated on 17-Aug-2023 18:48:31

139 Views

String consonants refer to the non-vowel sounds produced when pronouncing a string of characters or letters. In this article, we are going to study how to reverse only the consonants in a string without affecting the position of other elements using the following 2 methods in Python: Using append() ... Read More

How to Check if a given Matrix is a Markov Matrix using Python?

Aditya Varma

Aditya Varma

Updated on 17-Aug-2023 18:45:04

104 Views

In this article we are going to learn how to check whether the input matrix is a Markov Matrix using nested for loops and sum() function. Before that let us understand what is Markov Matrix with an example? The matrix is said to be a Markov matrix if the sum ... Read More

How to check Idempotent Matrix in Python?

Aditya Varma

Aditya Varma

Updated on 17-Aug-2023 18:41:56

68 Views

If a matrix produces the same matrix when multiplied by itself, it is said to be an idempotent matrix. If and only if M * M = M, the matrix M is considered to be an idempotent matrix. Where M is a square matrix in the idempotent matrix. Matrix M: ... Read More

Check Horizontal and Vertical Symmetry in the Binary Matrix using Python

Aditya Varma

Aditya Varma

Updated on 17-Aug-2023 18:39:16

167 Views

A binary matrix is a rectangular grid in which each element is either 0 or 1, indicating true or false states. It is widely employed to represent relationships, connectivity, and patterns across various disciplines Assume we have taken a 2D binary input matrix containing N rows and M columns. ... Read More

Advertisements