Time Zone Russian Roulette

Par 6
Question 62intermediateSheet 1750822302

Deep Breath

Your team is distributed across time zones because management hates synchronized lunch breaks. Every city name is backwards because the last dev who touched this code was later found rocking in a corner muttering about datetime parsing. Convert backwards city names into time differences that explain why you're in meetings at 3AM. Decode reversed city names and calculate timezone differences while maintaining sanity. The system must handle the chaos of global development teams while providing accurate time calculations for international operations. Your task: Untangle a time zone system designed by a chaos-loving developer who thinks kroY weN is a valid city and UTC stands for Unleash Total Confusion.

Why You're Doing This

This tests string manipulation, data lookup, and datetime calculations. You're working with corrupted data that needs to be decoded and normalized—common when dealing with legacy systems or data that's been processed through multiple transformations by developers who've lost their minds.

Take the W

  • Correctly reverses city names to identify locations
  • Looks up accurate timezone information
  • Calculates absolute time differences in hours

Hard L

  • Fails to reverse city names properly
  • Returns incorrect timezone calculations
  • Crashes on unknown city names

Edge Cases

  • Cities in the same timezone (difference = 0)
  • Cities crossing international date line
  • Misspelled or unknown reversed city names
  • Cities with seasonal daylight saving changes
Input Format:
Encoded city pair requiring string manipulation and lookup
Expected Output:
Integer hours difference for calendar systems
Example:
["kroY weN", "nodnoL"] → 5
Hints
  • 💡 Common cities: New York (UTC-5), London (UTC+0), Tokyo (UTC+9), Sydney (UTC+10)
  • 💡 String reversal: kroY weN → New York, nodnoL → London
  • 💡 Calculate absolute difference to avoid negative results