368. Largest Divisible Subset

leetcode-potd

Given a set of distinct positive integers nums, return the largest subset answer such that every pair (answer[i], answer[j]) of elements in this subset satisfies: answer[i] % […]

Rotten Oranges

gfg-potd

Given a matrix mat[][] of dimension n * m where each cell in the matrix can have values 0, 1 or 2 which has the following

BFS of graph

gfg-potd

Given a connected undirected graph containing V vertices, represented by a 2-d adjacency list adj[][], where each adj[i] represents the list of vertices connected to vertex i. Perform a Breadth First

DFS of Graph

gfg-potd

Given a connected undirected graph represented by a 2-d adjacency list adj[][], where each adj[i] represents the list of vertices connected to vertex i. Perform a Depth First

Maximize partitions in a String

gfg-potd

Given a string s of lowercase English alphabets, your task is to return the maximum number of substrings formed, after possible partitions (probably zero) of s such that no

2551. Put Marbles in Bags

leetcode-potd

You have k bags. You are given a 0-indexed integer array weights where weights[i] is the weight of the ith marble. You are also given the integer k. Divide the marbles

Scroll to Top