Prabhdeep Singh has Published 188 Articles

JavaScript Program to check if the matrix is lower Triangular

Prabhdeep Singh

Prabhdeep Singh

Updated on 13-Apr-2023 15:30:14

146 Views

A matrix can be defined as a 2D array that stores elements in it and mathematically it stores the numbers in it. A Lower triangular matrix is a squared matrix that has the same number of rows and columns and all the elements that are present above the main diagonal ... Read More

JavaScript Program to Check if it is possible to sort the array after rotating it

Prabhdeep Singh

Prabhdeep Singh

Updated on 13-Apr-2023 15:28:38

129 Views

Rotating an array means moving the elements of each index (excluding one end ) to the following index for the right rotation and the previous index for the left rotation. For the right rotation zeroth index takes the value of the last index and vice-versa for the left rotation. Sort ... Read More

JavaScript Program to Check if it is possible to make array increasing or decreasing by rotating the array

Prabhdeep Singh

Prabhdeep Singh

Updated on 13-Apr-2023 15:27:24

201 Views

Rotation of the array means to assume the array as a circular array and rotate the elements of the array to either their left or right direction by one index at each rotation and the element at one end may take the value present at another end. An Increasing array ... Read More

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

Prabhdeep Singh

Prabhdeep Singh

Updated on 13-Apr-2023 15:26:25

240 Views

Matrix is a kind of 2-D array in which there is an array of fixed arrays that defines the rows and for each index of this array there are fixed length arrays present and the length of these arrays defines the number of columns present in the matrix. We can ... Read More

JavaScript Program to Check if all array elements can be converted to pronic numbers by rotating digits

Prabhdeep Singh

Prabhdeep Singh

Updated on 13-Apr-2023 15:25:20

130 Views

Pronic numbers are also known as rectangular numbers, the pronic numbers are numbers that are multiples of two consecutive numbers. We will be given an array of integers and we can rotate the digits in any direction for a certain number of times to get all combinations. For any combination ... Read More

JavaScript Program for Rotate Doubly linked list by N nodes

Prabhdeep Singh

Prabhdeep Singh

Updated on 13-Apr-2023 15:21:21

264 Views

A doubly linked list is a linear data structure where each node stores the address of the next and previous node. We have given a doubly linked list and we have to rotate the doubly linked list by N nodes and print it. Here N is the positive number and ... Read More

JavaScript Program to Check if a string can be obtained by rotating another string d places

Prabhdeep Singh

Prabhdeep Singh

Updated on 13-Apr-2023 15:18:37

204 Views

Rotating a string means moving the characters of the string to their left or right side by one index and one end may contain the value stored at the other end. We will be given two strings and we have to rotate the second string either in the left or ... Read More

JavaScript Program For Reversing Alternate K Nodes In A Singly Linked List

Prabhdeep Singh

Prabhdeep Singh

Updated on 12-Apr-2023 12:23:26

225 Views

Reversing a linked list means arranging all the nodes of the linked list in the opposite manner as they were present earlier or moving the elements present at the last of the linked list towards the head and head nodes towards the tail. Alternate K nodes reversing means reversing the ... Read More

JavaScript Program For Reversing A Linked List In Groups Of Given Size

Prabhdeep Singh

Prabhdeep Singh

Updated on 12-Apr-2023 12:22:20

240 Views

A linked list is a linear data structure that consists of interconnected nodes. Reversing a linked list means changing the order of all its elements. Reversing a linked list in groups of a given size means, we are given a number and we will reverse the first given number of ... Read More

JavaScript Program for Reversal algorithm for right rotation of an array

Prabhdeep Singh

Prabhdeep Singh

Updated on 12-Apr-2023 12:21:05

242 Views

Right rotation of an array means to rotate the elements of the array to their right side by a given number of times and for the number which are present at the edge they will move to the first index in their right rotation by assuming an array in a ... Read More

Advertisements