cswork / OA打开练习工作台

MicrosoftOA #68

Three Partition Array

估计中等评测数据准备中,可先阅读题面

考点(AI 标注)双指针滑窗原地数组

Given an array and a range [lowVal, highVal], partition the array into three parts: All elements smaller than lowVal come first. All elements in the range [lowVal, highVal] come next. All elements greater than highVal come last. Additionally: If lowVal and highVal exist in the array, ensure that lowVal appears before highVal in the final result. The relative order of elements within each group doesn't matter. Function Description Complete the function threePartitionArray in the editor. threePartitionArray has the following parameters:

  • int arr[]: an array of integers
  • int lowVal: an integer representing the lower bound of the range
  • int highVal: an integer representing the upper bound of the range halo frenz - you might want to checkout lc75. They said that these 2 questions are relevant :)

Constraints

nothin found againnnn 😭