Roblox logo

Roblox

San Mateo, CAGaming

Interview Questions

Content Moderation Email Generator

Asked at Roblox
technical
string manipulation
formatting

Generate automated emails for content moderation based on detected keywords.

Function Signature:

function generateContentModerationEmail(
  detectedKeywords: string[],
  keywordToCategory: string[],
  categoryToInstruction: string[]
): string

Example: Input:

  • Keywords: ["hack", "heroin"]
  • Categories: ["hack,Hacking", "heroin,Drug"]
  • Instructions: [ "Hacking, Please ensure that cheating mechanisms are reported promptly to administrators.", "Drug, Please be aware of drug dealing in the game, report to police if necessary." ]

Output:

Subject: Detected Keywords in the Game

Dear User,

Our system has detected the following types of activity in the game:

Hacking: Please ensure that cheating mechanisms are reported promptly to administrators.
Drug: Please be aware of drug dealing in the game, report to police if necessary.

We encourage you to remain vigilant and take the appropriate actions outlined above.

Best regards,
[Your Organization's Name]

Path Sum in Binary Tree

Asked at Roblox
technical
binary tree
algorithms

Find number of paths in binary tree that sum to target value.

Function Signature:

function pathSum(root: TreeNode, targetSum: number): number

Requirements:

  • Path can start from any node
  • Must follow parent-to-child direction
  • Count all paths summing to target

Example: Input:

  • Tree: [5,4,8,11,null,13,4,7,2,null,null,5,1]
  • Target: 22

Output: 3 Paths: [5,4,11,2], [5,8,4,5], [4,11,7]

Solution: Use recursive approach with hashmap for cumulative sums.

Share Your Experience at Roblox