Skip to content
the poor coder

Home / Topics / #sort

#sort

6 posts
2021

Leetcode - Arithmetic Subarrays Solution

A sequence of numbers is called arithmetic if it consists of at least two elements, and the difference between every two consecutive elements is the same. More formally, a sequence s is arithmetic if and only if s[i+1]…

leetcodesort2 min read
2021

Leetcode - Shuffle String Solution

Given a string s and an integer array indices of the same length. The string s will be shuffled such that the character at the ith position moves to indices[i] in the shuffled string. Return the shuffled string. Example…

leetcodesort1 min read
2021

Leetcode - Sort Colors Solution

Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white, and blue. We will use the integers 0, 1, and 2…

ESC