FastPrepClosest Land Mark πŸ‘
Problems/Closest Land Mark πŸ‘

Closest Land Mark πŸ‘

Meta logoMeta● EasyOA

Updated Sep 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: For the original prompt, refer to the attached source image.

Imagine you're on a journey along the path of numbers, starting from your current location marked by an integer N. Your goal is to find the nearest landmark, which happens to be a Fibonacci number. But before you can reach it, you must determine the distance you need to travel to get there. Your task is to calculate this distance and return it as another integer.

Function

closestLandMark(aNum: int) β†’ int

Complete the function closestLandMark in the editor πŸ‘‰.

closestLandMark has the following parameter:

  1. int aNum: an integer number

Returns int: the distance to the closest "land mark".

Examples

Example 1

aNum = 25return = 4

No explanation provided for now. Will add once find it :)

Example 2

aNum = 5return = 0

No explanation provided for now. Will add once find it :)

Constraints

  • 0 ≀ N ≀ 1,000,000

More Meta interview questions

  • Convert a Sorted Linked List to a Balanced BSTPHONE SCREEN Β· Seen Nov 2026
  • Fuzzy Word Lookup With One Misspelled LetterPHONE SCREEN Β· Seen Nov 2026
  • Multi-Head Attention Forward PassPHONE SCREEN Β· ONSITE INTERVIEW Β· Seen Nov 2026
  • Run-Length Encoded Vector Dot ProductPHONE SCREEN Β· ONSITE INTERVIEW Β· Seen Nov 2026
  • Mutual-Friend RecommendationsPHONE SCREEN Β· ONSITE INTERVIEW Β· Seen Nov 2026
  • Best Time to Buy and Sell StockPHONE SCREEN Β· Seen Nov 2026
  • First Element Greater Than KPHONE SCREEN Β· Seen Nov 2026
  • Bank Accounts with Balance HistoryOA Β· Seen Nov 2026
  • Count Events in Rolling Minute WindowsPHONE SCREEN Β· Seen Oct 2026
  • Valid Word AbbreviationPHONE SCREEN Β· Seen Oct 2026

Similar questions at other companies

  • Last Digit of the Ways to Split Traders Between Two OfficesAkuna Capital Β· OAAkuna Capital interview questions
  • Counting Cows by Their LegsSusquehanna International Group (SIG) Β· OASusquehanna International Group (SIG) interview questions
  • Summarize Taxi Drivers and RidesBoston Consulting Group Β· OABoston Consulting Group interview questions
  • Total Cost Against the Lowest Earlier PricePayPal Β· OAPayPal interview questions
  • Count Valid Square PairsAuxoAI Β· OA
  • Server InvestmentRippling Β· OARippling interview questions
  • Basic Item DiscountsPalantir Β· OAPalantir interview questions
  • Identification Number Check DigitAbridge Β· OAAbridge interview questions
  • Count Substrings With Identical CharactersVirtu Financial Β· OAVirtu Financial interview questions
  • Next Pascal Row CoefficientIntuit Β· OAIntuit interview questions

Meta interview experiences

  • Meta PhD SWE Intern AI Coding Phone Screen: 1 Experience
  • Meta Business Support Engineer Phone Screen: 1 Experience
  • Meta Software Engineer Onsite Questions: 3 Experiences
  • Meta AI Native Engineer OA and Onsite: 1 Experience
  • Meta AI-Native Coding Interview: 3 Experiences
  • Meta Production Engineer Intern Questions: 6 Experiences
All Meta interview questionsSee Meta hiring insights
Saved
class Solution {
    public int closestLandMark(int aNum) {
        // write your code here
    }

}
Checking account…