FastPrepFind the First Matching Ordered Entry
Problems/Find the First Matching Ordered Entry

Find the First Matching Ordered Entry

Figma logoFigma● EasyINTERNOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: A Figma intern who completed the Byteboard assessment recalled using an O(log n) binary search over ordered entries. The report did not share the entry type, what the target means, the rule for duplicates, the interface, examples, or the limits. Our version is about 55% the same as the reported question.

Given a lexicographically nondecreasing array of lowercase ASCII strings entries and a lowercase ASCII string target, return the index of the first entry equal to target.

If target does not appear, return -1. Duplicate entries are allowed.

Function

findOrderedEntry(entries: String[], target: String) → int

Examples

Example 1

entries = ["ant","bee","cat","dog"]target = "cat"return = 2

cat appears at index 2.

Example 2

entries = ["a","b","b","b","c"]target = "b"return = 1

The first of the three matching entries is at index 1.

Example 3

entries = []target = "z"return = -1

An empty collection contains no matching entry.

Constraints

  • 0 <= entries.length <= 200000.
  • Each entry and target contains between 1 and 100 lowercase ASCII letters.
  • entries is sorted in lexicographically nondecreasing order.

More Figma interview questions

  • Layer History with Batch Undo and RedoOA · PHONE SCREEN · Seen Sep 2026
  • Document and Layer OperationsOA · Seen Sep 2020
  • Recursive Display SortPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Route Graph Reachability with a Broken LinkPHONE SCREEN · Seen Oct 2026
  • Rich Text Parser Part 3 (Depth Tokens)PHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Rich Text Parser Part 2 (Parse Nested Groups)PHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Rich Text Parser Part 1 (Validate Tokens)PHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Table Selection and Color UpdatesPHONE SCREEN · ONSITE INTERVIEW · Seen Aug 2026
  • Sort Documents Left to RightONSITE INTERVIEW · Seen Aug 2026
  • Symmetric Binary TreeONSITE INTERVIEW · Seen Feb 2026

Similar questions at other companies

  • Product Record SearchWells Fargo · OAWells Fargo interview questions
  • Closest Version DateAmazon · ONSITE INTERVIEW
  • Find Unmet Users With Shared InterestsPalantir · ONSITE INTERVIEWPalantir interview questions
  • Search a Sorted Array of WordsExpedia · ONSITE INTERVIEWExpedia interview questions
  • Lexicographic Search SuggestionsGoogle · ONSITE INTERVIEWGoogle interview questions
  • Find the Words for Each PrefixDocuSign · PHONE SCREENDocuSign interview questions
  • Count User Mentions in Chat MessagesRamp · OARamp interview questions
  • Find Words That Can Be Formed by CharactersTabaPay · OA
  • Word Frequency Counts in Alphabetical OrderAbridge · OAAbridge interview questions
  • First Missing Number in a Consecutive ArrayArista Networks · OA · PHONE SCREENArista Networks interview questions

Interview reports that mention this question

  • Figma SWE Intern OA and Final Round: 21 Experiences
  • Figma SWE Intern OA Questions: 25 Experiences

Figma interview experiences

  • Figma interviews · November 2026
All Figma interview questionsSee Figma hiring insights
Saved
class Solution {
    public int findOrderedEntry(String[] entries, String target) {
        // Write your code here.
    }
}
Checking account…