Prabhdeep Singh has Published 188 Articles

Check if string A can be converted to string B by changing A[i] to A[i+1] or A[i]..A[i+K-1] to A[i]+1 each

Prabhdeep Singh

Prabhdeep Singh

Updated on 31-Aug-2023 11:10:08

154 Views

We are given two strings and we have to check if it is possible to convert the first string to another by performing any number of times a particular given task. The tasks that can be performed on the given first string only and the tasks are: ... Read More

Find Binary String of size at most 3N containing at least 2 given strings of size 2N as subsequences

Prabhdeep Singh

Prabhdeep Singh

Updated on 31-Aug-2023 10:55:25

143 Views

We are given three strings of equal size equal to 2*N, where N is an integer. We have to create a string of the size 3*N and at least two strings from the given strings be the subsequence of it. Also, the given strings are binary strings which means they ... Read More

Count of setbits in bitwise OR of all K length substrings of given Binary String

Prabhdeep Singh

Prabhdeep Singh

Updated on 31-Aug-2023 10:52:49

184 Views

Set bits are the bits in the binary representation of the number which are '1'. The binary representation of the number contains only two digits '1' and '0', also it may be present in the form of a string. We are given a string, the binary representation of a given ... Read More

Longest Common Subsequence with no Repeating Character

Prabhdeep Singh

Prabhdeep Singh

Updated on 31-Aug-2023 10:31:28

298 Views

In a string, a subsequence is a string that can be formed by deleting some character from it which means it contains some character from the string may be all or none and all will be present in the same order of the string. Among two strings we have to ... Read More

Capitalize 1st character of all words having at least K characters

Prabhdeep Singh

Prabhdeep Singh

Updated on 31-Aug-2023 10:28:01

125 Views

In the English language while writing a sentence we need to start with the capital character and for any name of the city/person, etc we begin with the capital letter. Here in this problem, we are given a string and a number and we have to update the first character ... Read More

Minimize cost by splitting the given Array into subsets of size K and adding the highest K/2 elements of each subset into the cost

Prabhdeep Singh

Prabhdeep Singh

Updated on 31-Aug-2023 10:21:32

233 Views

Splitting the array means we have to divide the array and make subsets. Here in this problem, we have given an array of integers with size n and integer k and our goal is to calculate the lowest cost by splitting the whole given array into the subsets of size ... Read More

Calculate server loads using Round Robin Scheduling

Prabhdeep Singh

Prabhdeep Singh

Updated on 24-Aug-2023 15:57:59

898 Views

Round robins scheduling is used in CPU scheduling, we are given some M number of servers and N number of requests. Each request has some arrival time and processing time. We have to find the load on each server using the Round-Robin Scheduling for which we are going to implement ... Read More

Generate Linked List consisting of maximum difference of squares of pairs of nodes from given Linked List

Prabhdeep Singh

Prabhdeep Singh

Updated on 24-Aug-2023 15:56:44

103 Views

A linked list is a linear data structure that consists of nodes and each node is not present in the contiguous form in the main memory, instead, each node contains the address of the next node. We are given a linked list of even length, we have to create a ... Read More

Dumping queue into list or array in Python

Prabhdeep Singh

Prabhdeep Singh

Updated on 24-Aug-2023 15:54:25

473 Views

A queue is a linear data structure that works on the FIFO property where each element is added to the queue from the rear and the elements are extracted from the front and use the principle of first in first out. In the list, we can access every element while ... Read More

K-th Smallest Element in an Unsorted Array using Priority Queue

Prabhdeep Singh

Prabhdeep Singh

Updated on 24-Aug-2023 15:53:20

585 Views

A priority queue is a heap-based data structure, stores elements in such a way that the greatest or smallest element always be present on the top. We are given an array that is unsorted and we have to find the Kth smallest element from it using the Priority Queue. Here, ... Read More

Advertisements