Category: c / c++
Given two sorted linked lists l0, and l1, return a new sorted linked list containing the intersection of the two lists. Constraints n ≤ 100,000 where n is the …
Given two linked lists l0 and l1, return the two linked lists interleaved, starting with l0. If there are leftover nodes in a linked list, they should be added …
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 …