Vanshika Sood has Published 28 Articles

Smallest string divisible by two given Strings

Vanshika Sood

Vanshika Sood

Updated on 27-Oct-2023 16:00:53

636 Views

The objective of this article is to determine the smallest string that is a multiple of both given strings. An interesting observation to note is that for two given strings s and t, the string s is a multiple of t if and only if s can be formed by ... Read More

Set the Leftmost Unset Bit

Vanshika Sood

Vanshika Sood

Updated on 27-Oct-2023 15:56:21

187 Views

This article seeks a method for setting a given number's leftmost unset bit. The first unset bit after the most significant set bit is considered the leftmost unset bit. Problem Statement Given a number n, the task is to set the left most bit of the binary expansion of the ... Read More

Print the frequency of adjacent repeating characters in a given string

Vanshika Sood

Vanshika Sood

Updated on 25-Oct-2023 12:05:37

53 Views

A string is a data structure consisting of a sequence of characters. The end of the string is marked by a special character, called a null character, which is usually represented by the ASCII code 0. Problem Statement Given a string s of a certain length, the task at hand ... Read More

Minimize removals to remove another string as a subsequence of a given string

Vanshika Sood

Vanshika Sood

Updated on 25-Oct-2023 12:01:38

70 Views

A subsequence refers to a sequence that can be obtained from another sequence by removing zero or more elements, without altering the order of the remaining elements. In simpler terms, a subsequence is derived by selecting elements from the original sequence, while preserving their relative order. For example, consider the ... Read More

Check if given string is prefix subarray of the given array

Vanshika Sood

Vanshika Sood

Updated on 25-Oct-2023 11:59:25

38 Views

A subarray of an array is a contiguous part of the array in which we take a group of consecutive elements while also maintaining the relative ordering of elements as present in the original array. Example − Some valid subarrays are − etc. A prefix subarray is a special type ... Read More

Check if every row in given Matrix contains all the integers from 1 to N

Vanshika Sood

Vanshika Sood

Updated on 25-Oct-2023 11:52:35

38 Views

A matrix is a two-dimensional data structure made up of rows and columns set out like a grid of squares. Grids, multidimensional arrays, and tabular data are frequently represented using it. Problem Statement We are given a matrix of dimensions and the task is to check whether each ... Read More

Numbers whose Factorials end with n Zeros

Vanshika Sood

Vanshika Sood

Updated on 08-Sep-2023 11:46:46

85 Views

A factorial of a number is the product of all positive integers up to the given number. For example, the factorial of 5 is denoted as 5! and is equal to the product of all positive integers up to 5: 5! = 5 x 4 x 3 x 2 x ... Read More

Time Required to Meet in Equilateral Triangle

Vanshika Sood

Vanshika Sood

Updated on 08-Sep-2023 11:42:35

52 Views

An equilateral triangle is a triangle with all of its sides equal in length. As the three sides are equal, the three angles opposing the equal sides are also equal in magnitude. As a result, it is also known as an equiangular triangle, with each angle measuring 60 degrees. The ... Read More

Program to calculate Volume and Surface area of Hemisphere

Vanshika Sood

Vanshika Sood

Updated on 08-Sep-2023 11:34:47

154 Views

A sphere is a three-dimensional geometric shape that is perfectly round like a ball, while a hemisphere is one half of a sphere. In essence, a sphere would split into two hemispheres if it were sliced in half. Hemispheres are identified by their curving surface, which radiates out from the ... Read More

Leibniz Harmonic Triangle

Vanshika Sood

Vanshika Sood

Updated on 08-Sep-2023 11:19:04

86 Views

The Leibniz harmonic triangle, also known as Leibniz's series or the Leibniz formula, is a triangular arrangement of numbers discovered by German mathematician and philosopher Gottfried Wilhelm Leibniz in the late 17th century. The Leibniz harmonic triangle is a triangular arrangement of fractions. We start at the top with ... Read More

Advertisements