JobsJob TrackerJob alerts

1mg ยท 12 questions

All 12Coding 11System Design 1
  • Arrange numbers to yield the largest valueCoding
  • Longest increasing subsequence count after replacementCoding
  • Design an Authentication systemSystem Design
  • Find minimum element in a sorted and rotated arrayCoding
  • Maximum length substring for even palindromeCoding
  • Shortest string of accelerations and reverses to reach NCoding
  • Implement rand3() using rand2()Coding
  • Find repeating elements in O(n) and constant spaceCoding
  • Count frequency of elements in an unsorted arrayCoding
  • Check if a binary tree is BSTCoding
  • Print characters and their frequenciesCoding
  • Quicksort vs Mergesort, Binary Tree Left View, String ReversalCoding
โ† 1mg questions
  1. Interview questions
  2. 1mg
  3. Shortest string of accelerations and reverses to reach N
Coding

Shortest string of accelerations and reverses to reach N

Filed under 1mg

The question

Given a car starting at origin with velocity 1 that doubles on acceleration and inverts on reverse, find the shortest combination of 'A' and 'R' moves to reach +N.

No write-up yet. Related questions below have one.

Related 1mg questions

  • Arrange numbers to yield the largest value
  • Longest increasing subsequence count after replacement
  • Find minimum element in a sorted and rotated array
  • Maximum length substring for even palindrome
  • Implement rand3() using rand2()
โ† Maximum length substring for even palindromeImplement rand3() using rand2() โ†’

Collected from public candidate posts and coding forums. Updated Nov 2026.