PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Ansys

Implement Prefix Search and Node Removal

Last updated: Apr 2, 2026

Quick Overview

This question evaluates proficiency in string data structures and manipulation (prefix-search concepts including case-insensitive matching and regex-based normalization) as well as linked list pointer manipulation and in-place node removal.

  • medium
  • Ansys
  • Coding & Algorithms
  • Software Engineer

Implement Prefix Search and Node Removal

Company: Ansys

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

This interview included two coding tasks: 1. Implement a prefix-search data structure for strings with two operations: `insert(word)` and `count_with_prefix(prefix)`. A follow-up asks how to make matching case-insensitive and how to normalize inputs by removing trailing digits with a regular expression before storing or querying. 2. Given the head of a singly linked list and a target value `x`, remove every node whose value equals `x` and return the new head.

Quick Answer: This question evaluates proficiency in string data structures and manipulation (prefix-search concepts including case-insensitive matching and regex-based normalization) as well as linked list pointer manipulation and in-place node removal.

Ansys logo
Ansys
Dec 31, 2025, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
2
0

This interview included two coding tasks:

  1. Implement a prefix-search data structure for strings with two operations: insert(word) and count_with_prefix(prefix) . A follow-up asks how to make matching case-insensitive and how to normalize inputs by removing trailing digits with a regular expression before storing or querying.
  2. Given the head of a singly linked list and a target value x , remove every node whose value equals x and return the new head.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Ansys•More Software Engineer•Ansys Software Engineer•Ansys Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,000+ 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.