Given an equation with a variable ‘x’ and basic arithmetic operations (’+’, ‘-’), find the value of ‘x’. The equation might have a solution, no solution, or infinite solutions. Your task is to return the correct result in the form of a string.
Given two integers n and k, construct a list of n different positive integers from 1 to n such that the absolute differences between consecutive elements contain exactly k distinct integers. Return any valid solution.
You are given an integer num, and you can swap two digits at most once to get the largest possible number. Return the maximum number that can be obtained after performing the swap.
You are in a room with n bulbs, all initially turned on. There are four buttons on the wall, each with a different functionality: flip all bulbs, flip even-numbered bulbs, flip odd-numbered bulbs, and flip bulbs with labels j = 3k + 1. You need to make exactly presses presses. For each press, you can choose any button. Return the number of distinct possible configurations of the bulbs after performing all the presses.