Tag: Two pointer algorithm
Teaching Kids Programming: Videos on Data Structures and Algorithms Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = , nums2 = Output: Example …
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 …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given two strings s and t, check if s is a subsequence of t. A subsequence of a string is …
Given a list of non-negative integers nums, return the total number of 3 unique numbers that can create a triangle. Constraints n ≤ 1,000 where n is the length …