PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Figma

Validate an IPv4 address string

Last updated: Apr 24, 2026

Quick Overview

Evaluates string parsing and input-validation skills, including digit-only checks, delimiter-based splitting, numeric range enforcement, and edge-case handling. Commonly asked to assess attention to input formats and robustness in implementation; Category: Coding & Algorithms; Level: implementation-level (concrete string manipulation and validation).

  • medium
  • Figma
  • Coding & Algorithms
  • Data Engineer

Validate an IPv4 address string

Company: Figma

Role: Data Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

Given a string `s`, determine whether it is a valid IPv4 address. A valid IPv4 address: - Has exactly 4 parts separated by dots (`.`): `x1.x2.x3.x4` - Each part is a base-10 integer in the range `[0, 255]` - No extra characters are allowed (only digits and dots) Examples: - Valid: `"192.168.1.1"`, `"192.168.1.0"` - Invalid: `"192.168.100.1.1"` (5 parts), `"192.1681.1"` (missing dot separation) Write a function that returns `True` if `s` is a valid IPv4 address and `False` otherwise.

Quick Answer: Evaluates string parsing and input-validation skills, including digit-only checks, delimiter-based splitting, numeric range enforcement, and edge-case handling. Commonly asked to assess attention to input formats and robustness in implementation; Category: Coding & Algorithms; Level: implementation-level (concrete string manipulation and validation).

Related Interview Questions

  • Implement Layer History and Grid Counting - Figma (medium)
  • Write SQL for first share and closest collaborator - Figma (medium)
  • Design document layer with undo/redo - Figma (Medium)
  • Design document editor with undo/redo and batching - Figma (Medium)
Figma logo
Figma
Jan 20, 2026, 12:00 AM
Data Engineer
Technical Screen
Coding & Algorithms
6
0

Given a string s, determine whether it is a valid IPv4 address.

A valid IPv4 address:

  • Has exactly 4 parts separated by dots ( . ): x1.x2.x3.x4
  • Each part is a base-10 integer in the range [0, 255]
  • No extra characters are allowed (only digits and dots)

Examples:

  • Valid: "192.168.1.1" , "192.168.1.0"
  • Invalid: "192.168.100.1.1" (5 parts), "192.1681.1" (missing dot separation)

Write a function that returns True if s is a valid IPv4 address and False otherwise.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Figma•More Data Engineer•Figma Data Engineer•Figma Coding & Algorithms•Data Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.