JobsJob TrackerJob alerts

Turvo ยท 17 questions

All 17Coding 15System Design 2
  • Airport runway system designSystem Design
  • Down to Zero IICoding
  • Minimum cost for pencilsCoding
  • Find first repeating numberCoding
  • Find index of wrong characterCoding
  • Design a hit counterSystem Design
  • Check if binary tree is BSTCoding
  • Kth largest elementCoding
  • Check valid string frequencyCoding
  • Distinct options to form k contiguous groups from n peopleCoding
  • Determine largest gap in positions of cars across lanesCoding
  • Reverse an integer without converting to stringCoding
  • Find k'th smallest number in sorted and rotated arrayCoding
  • Find root-to-leaf path with given sum in binary treeCoding
  • Find number of connected components in undirected graphCoding
  • Can Place Flowers and Longest Common Prefix using TrieCoding
  • Find Original Array from Consecutive Difference ArrayCoding
โ† Turvo questions
  1. Interview questions
  2. Turvo
  3. Minimum cost for pencils
Coding

Minimum cost for pencils

Filed under Turvo

The question

N students sit in a row. Each student has different prices for 3 types of pencils. Adjacent students cannot use the same type of pencil. Find the minimum cost to buy pencils for all students.

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

Related Turvo questions

  • Down to Zero II
  • Find first repeating number
  • Find index of wrong character
  • Kth largest element
  • Check valid string frequency
โ† Down to Zero IIFind first repeating number โ†’

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