You are given an integer ’n’. Your task is to find all pairs of prime numbers [x, y] such that 1 <= x <= y <= n, x + y = n, and both x and y are prime numbers. Return a 2D sorted list of such prime pairs. If no such pairs exist, return an empty array.
Given two integers num and t, determine the maximum achievable number after performing at most t operations, where each operation allows simultaneous increments or decrements of num and the target number by 1.
You have a bank account with a balance of 100 dollars. You are given a purchase amount and need to round it to the nearest multiple of 10. Then, deduct the rounded amount from your account balance and return the remaining balance.
You are given the head of a linked list, where each node contains an integer. For each pair of adjacent nodes, insert a new node with a value equal to the greatest common divisor (GCD) of the two nodes. Return the modified linked list after performing this operation.
You are given the head of a non-empty linked list representing a non-negative integer, where each node contains a single digit of the number. Your task is to double the integer represented by the linked list and return the resulting number as a new linked list.
Given two integers, n and k, construct a k-avoiding array of length n. A k-avoiding array is an array of distinct positive integers where no two elements sum up to k. Return the minimum possible sum of such an array.