Coding Exercise Posts - page 30 of 43

Recent posts

Mixed Sorting

1 minute read

Given a list of integers nums, sort the array such that:

Missing Numbers From 1 to N

1 minute read

You are given a list of integers nums of length n where all numbers in the list are from the interval \([1, n]$` and some elements appear twice while others ...

Minimum String

less than 1 minute read

You are given two strings s and t of equal length only consisting of lowercase letters. Assuming that you can first rearrange s into any order, return the mi...

Minimum Stack

1 minute read

Implement a stack with the following methods:

Minimum Initial Value for Positive Prefix Sums

less than 1 minute read

You are given a list of integers nums. Return the minimum positive value we can append to the beginning of nums such that prefix sums of the resulting list c...

Minimum Cost Sort

1 minute read

Given a list of integers nums, return the minimum cost of sorting the list in ascending or descending order. The cost is defined as the sum of absolute diffe...

Minimum Bracket Addition

less than 1 minute read

Given a string s containing brackets ( and ), return the minimum number of brackets that can be inserted so that the brackets are balanced.

Merging Two Sorted Lists

less than 1 minute read

Given two lists of integers a and b sorted in ascending order, merge them into one large sorted list.

Merging Binary Trees

1 minute read

Given two binary trees node0 and node1, return a merge of the two trees where each value is equal to the sum of the values of the corresponding nodes of the ...

Median Minimization

less than 1 minute read

Given a list of integers nums, split it into two lists of equal size where the absolute difference between each list’s median is as small as possible and ret...