Tag: c++
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 …
Given a singly linked list node, reorder it such that we take: the last node, and then the first node, and then the second last node, and then the …