Check if two given matrices are identical

Check if two given matrices are identical

Given two matrices, we will write a function to check whether the two matrices are identical or not. That is, if all the elements...
Addition of Matrices

Addition of Matrices

Given two matrices, we need to add the two matrices and give new matrix. Example Input : A = { {1, 4, 7, 9}, {1, 6, 7,...
Transpose of a Matrix

Transpose of a Matrix

Given two matrices, we need to add the two matrices and give new matrix. Transpose of a matrix :  The transpose of a matrix is...
Check whether strings are k distance apart or not

Check whether strings are k distance apart or not

Given two strings and an integer k, write a function to check whether the given strings are k distance apart or not. That is...
Program to toggle all characters in a string

Program to toggle all characters in a string

Given a string, write a function to toggle all characters of the given string. Here toggle means converting all the uppercase characters to lowercase...
Check length of a string is equal to the number appended at its last

Check length of a string is equal to the number appended at its last

Given a string that is appended with a number at last, write a function that checks whether the length of the string excluding the...
Generate all binary strings without consecutive 1's

Generate all binary strings without consecutive 1’s

Given an integer k, write a function to print all binary strings of size k with no consecutive 1's Example INPUT k = 3 OUTPUT "000", "001", "101", "010",...
Check if all rows of a matrix are circular rotations of each other

Check if all rows of a matrix are circular rotations of each other

Given a matrix, write a function to find whether all rows are circular rotations of each other or not Example INPUT s =  a b c c b...
Sort a string according to another string

Sort a string according to another string

Given two input strings, a pattern and a string. We need to sort the string according to the order defined by pattern. Pattern string...
Check if string can become empty by recursively deleting given sub-string

Check if string can become empty by recursively deleting given sub-string

Check if the given input string can be deleted completely by deleting given input sub-string recursively. Given sub-string should be present in the input string Examples a)...

Stay connected

9,228FansLike

Latest article

Multiplication of two matrices

Multiplication of two matrices

Given two matrices, this function will multiply the two matrices and prints the result. Here, necessary and sufficient condition is the number of columns...
Subtraction of two matrices

Subtraction of two matrices

Given two matrices, we will write a function that subtracts the given matrices. Example INPUT A = { {1, 4, 7, 9}, {1, 6, 7, 6}, {6, 3, 7,...
Check if two given matrices are identical

Check if two given matrices are identical

Given two matrices, we will write a function to check whether the two matrices are identical or not. That is, if all the elements...