Tag: c++
Given an N by N matrix of letters matrix, return whether there are exactly N different letters that appear in the matrix and each letter appears exactly once in …
Given a list of integers nums, sort the array such that: All even numbers are sorted in increasing order All odd numbers are sorted in decreasing order The relative …
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 …
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. …