L2-002 Linked List Deduplication

Given a linked list L with integer keys, you need to remove nodes with duplicate absolute key values. That is, for each key K, only the first node with absolute value K is kept. Meanwhile, all removed nodes must be saved in another linked list. For example, given L as 21→-15→-15→-7→15, you should output the deduplicated list 21→-15→-7 and the r ...

Posted on Wed, 13 May 2026 21:51:45 +0000 by nolos

Backtracking with Element Tracking for Deduplication

Problem 491: Non-decreasing Subsequences Given an integer array nums, return all the different non-decreasing subsequences that have atleast two elements. The answer can be in any order. When two integers are equal, this counts as a valid increasing sequecne. Example 1: Input: nums = [4,6,7,7] Output: [[4,6],[4,6,7],[4,6,7,7],[4,7],[4,7,7],[6,7 ...

Posted on Fri, 08 May 2026 23:26:45 +0000 by mcccy005