Count Symmetric Length-3 Substrings
Asked at Capital One · Coding Questions · Difficulty: Easy
Given a string `s`, count the number of contiguous length-3 substrings whose first and last characters match, case-insensitively. The middle character is irrelevant. Strings shorter than 3 return 0.
Loading the problem…
More Capital One interview questions
- Implement Top-P (Nucleus) Sampling
- Design a Customer-Service Chatbot for Capital One
- Bias-Variance Trade-off: Diagnose and Fix a Model
- Explain a Regressing Production Model to a PM
- Amusement Park Profitability Case
- MLE Deployment, Monitoring & Latency Optimisation