Category: algorithms
Given a list of integers nums, swap each consecutive even indexes with each other, and swap each consecutive odd indexes with each other. Example 1 Input nums = Output …
Teaching Kids Programming: Videos on Data Structures and Algorithms A Set is a data structure to hold unique elements in a collection. In Python we can use set() to …
Given a two-dimensional integer matrix, sort each of the diagonals descending from left to right in ascending order. Constraints n, m ≤ 25 where n and m are the …
Given a singly linked list node, return the value of the kth last node (0-indexed). k is guaranteed not to be larger than the size of the linked list. …
Given a list of integers nums, return whether all numbers appear an even number of times. Constraints n ≤ 100,000 where n is the length of nums Example 1 …