HPE | Recent Online Assessment 2025 | Tree Optimization & IP Parsing | Latest HPE Placement Questions 2025 | String Validation & Dynamic Programming

Question · Posted Mar 2026

Question 1: Location Detection Problem Statement: The system should identify a user's region based on their IP address. IPv4 addresses are written as four numbers separated by periods, like "127.10.20.30". Each number is called an octet. Based on the first octet, addresses fall into one of five regions: 0.0.0.0 – 127.255.255.255 128.0.0.0 – 191.255.255.255 192.0.0.0 – 223.255.255.255 224.0.0.0 – 239.255.255.255 240.0.0.0 – 255.255.255.255 You are given a list of IP addresses. For each one, check if it is valid. If ...

The full answer & interview discussion are available to premium members.

Log in Create a free account