PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Sumologic

Solve substring and access-log problems

Last updated: Apr 12, 2026

Quick Overview

This question evaluates proficiency in string algorithms, frequency analysis, and set/hash-based data processing by testing substring transformation under constrained edits and cross-day URL comparison for users.

  • medium
  • Sumologic
  • Coding & Algorithms
  • Software Engineer

Solve substring and access-log problems

Company: Sumologic

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

The interview included the following coding tasks: 1. **Longest uniform substring after limited changes** Given a string `s` consisting of uppercase English letters and an integer `k`, you may replace at most `k` characters with any uppercase letter. Return the maximum length of a contiguous substring that can be transformed into a string of identical characters after at most `k` replacements. 2. **Detect cross-day URL changes for the same user** You are given two web access logs, one for each day. Each log is a list of records in the form `(user_id, url)`. Determine whether there exists at least one user who appears in both days and has visited different URLs across the two days. If a user appears multiple times in a day, consider all URLs they visited on that day. Return `true` if such a user exists; otherwise return `false`.

Quick Answer: This question evaluates proficiency in string algorithms, frequency analysis, and set/hash-based data processing by testing substring transformation under constrained edits and cross-day URL comparison for users.

Sumologic logo
Sumologic
Feb 10, 2026, 12:00 AM
Software Engineer
Onsite
Coding & Algorithms
0
0
Loading...

The interview included the following coding tasks:

  1. Longest uniform substring after limited changes
    Given a string s consisting of uppercase English letters and an integer k , you may replace at most k characters with any uppercase letter. Return the maximum length of a contiguous substring that can be transformed into a string of identical characters after at most k replacements.
  2. Detect cross-day URL changes for the same user
    You are given two web access logs, one for each day. Each log is a list of records in the form (user_id, url) . Determine whether there exists at least one user who appears in both days and has visited different URLs across the two days. If a user appears multiple times in a day, consider all URLs they visited on that day. Return true if such a user exists; otherwise return false .

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Sumologic•More Software Engineer•Sumologic Software Engineer•Sumologic 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.