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 …
Teaching Kids Programming: Videos on Data Structures and Algorithms What is a Palindrome string? A Palindrome is a string that spelt backwards is also the same, like “racecar”. Palindrome …
Given a list of integers nums, return whether there’s an integer whose frequency in the list is same as its value. Constraints n ≤ 100,000 where n is the …
Teaching Kids Programming: Videos on Data Structures and Algorithms Introduction to Trees and Binary Trees A tree in math or data structure is upside-down. A tree has one root …
Given a singly linked list node whose values are integers, determine whether the linked list forms a palindrome. A palindrome is defined as a sequence whose values are the …
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 …