Tag: c++
Given a string s, return the longest prefix of s that is not equal to s and exists as a suffix of s. Constraints n ≤ 100,000 where n …
Given two lowercase alphabet strings a and b, return the length of the longest anagram subsequence. Constraints n ≤ 100,000 where n is the length of a m ≤ …
The n queens puzzle asks to place n queens on an n×n chessboard so that no two queens are attacking each other. Given a two-dimensional integer matrix where 1 …
You are given a two dimensional array matrix, containing strings “r”, “g”, and “b”. Perform a floodfill operation at row r, column c with the color target. A floodfill …
Given a list of integers nums and an integer k, determine if there are three distinct elements in the list that add up to k. Constraints n ≤ 1,000 …