FastPrepString Formation
Problems/String Formation

String Formation

Atlassian logoAtlassian● HardINTERNFULLTIMEOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in an Atlassian online assessment for interns and full-time roles. Our version follows the whole prompt as shown in the report.

All words have equal length. Form target by choosing its characters from strictly increasing column indices; at a chosen column, the character may come from any word. Count distinct index-and-word choices modulo 10^9 + 7.

Function

numWays(words: String[], target: String) → int

Examples

Example 1

words = ["adc","aec","efg"]target = "ac"return = 4

There are two choices for 'a' in column zero and two choices for 'c' in column two.

Constraints

  • 1 <= words.length <= 1000
  • 1 <= words[i].length <= 3000
  • 1 <= target.length <= words[i].length
  • All characters are lowercase English letters.

More Atlassian Online Assessment questions

  • Planning ProductionOA · Seen Feb 2025
  • K-Means ClusteringOA · Seen Feb 2025
  • Minimum Sorted Erasure OperationsOA · Seen Jun 2024
  • Count Analogous ArraysOA · Seen Mar 2024
  • Get Maximum ScoreOA · Seen Mar 2024
  • Better Compression 🦀OA · Seen Mar 2024
  • Romanizer 🐡OA · Seen Mar 2024
  • Flower Bouquets 💐OA · Seen Mar 2024
  • Binary Search Tree IteratorOA · Seen Nov 2023
  • Binary Tree Level Order TraversalOA · Seen Nov 2023

Similar questions at other companies

  • Minimum Merge ConflictsAmazon · OA
  • Lexicographically Smallest Grid Path with One Letter ChangeInfosys · OAInfosys interview questions
  • String Formation (Also for AI/ML Software Engineer Intern :)Snowflake · OASnowflake interview questions
  • Longest Subsequence which is a SubstringSalesforce · OASalesforce interview questions
  • Distinct MovesMeesho · OA
  • Compressed Representation SizeMicrosoft · OAMicrosoft interview questions
  • Find Minimum OperationsIBM · OAIBM interview questions
  • String Challenge (Generic)TikTok · OATikTok interview questions
  • Maximize the Lottery IDCitadel · OACitadel interview questions
  • Sum of All ValuesFlexport · OAFlexport interview questions

Atlassian interview experiences

  • Atlassian MLE Phone Screen: Model Deployment Design: 1 Experience
  • Atlassian Coding Screens and Karat: 3 Experiences (Part 2 of 2)
  • Atlassian Full Stack Interviews: 11 Experiences (Part 1 of 2)
All Atlassian interview questionsSee Atlassian hiring insights
Saved
class Solution {
    public int numWays(String[] words, String target) {
      // Write your code here.
    }

}
Checking account…