Coding Exercise Posts - page 27 of 43

Recent posts

Repeated Deletion

less than 1 minute read

Given a string s, repeatedly delete the earliest consecutive duplicate characters.

Repeated Addition

less than 1 minute read

Given a positive integer n, sum all of its digits to get a new number. Repeat this operation until the new number is less than 10 and return it.

Removing Triple Successive Duplicates

1 minute read

Given a string s containing "0"s and "1"s, consider an operation where you pick a character and toggle its value from "0" to "1" or from "1" to "0". Return t...

Remove One Letter

less than 1 minute read

Given two strings s0 and s1, return whether you can obtain s1 by removing 1 letter from s0.

Remove Last Duplicate Entries

less than 1 minute read

Given a list of integers nums, find all duplicate numbers and delete their last occurrences.

Remove Half of the List

1 minute read

Given a list of integers nums, consider an operation where you pick any number e and remove every number in nums equal to e. Return the minimum number of ope...

Remove Duplicates in Linked List

less than 1 minute read

Given a singly linked list node, remove nodes with duplicate values while maintaining relative order of the original list.

Reflected Binary Code

less than 1 minute read

Given an integer n, return the nth (0-indexed) gray code number. Gray code is a way of ordering binary numbers such that each consecutive number’s values dif...

Recurring Character

less than 1 minute read

Given a lowercase alphabet string s, return the index of the first recurring character in it. If there are no recurring characters, return -1.

Rectangular Overlap

less than 1 minute read

You are given two lists of integers rect0 and rect1 representing coordinates (x0, y0, x1, y1) of two rectangles. (x0, y0) is the bottom left coordinate and (...

Range Update

1 minute read

You are given a list of integers nums and a two-dimensional list of integers operations. Each operation is of the following form: [L, R, X], which means that...