← All problemsSign in

2833. Furthest Point From Origin

LeetCodeStringCountingOpen on judge ↗

You are given a string moves of length n consisting only of characters 'L', 'R', and '_'. The string represents your movement on a number line starting from the origin 0. In the ith move, you can choose one of the following directions: - move to the left if moves[i] = 'L' or moves[i] = '_' - move to the right if moves[i] = 'R' or moves[i] = '_' Return the distance from the origin of the furthe

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start