PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Fortinet

Solve linked list reversal and minima problems

Last updated: Mar 29, 2026

Quick Overview

This set of problems evaluates proficiency in fundamental data structures and algorithms, specifically linked list manipulation (reversal and linear-time minimum search) and binary-search techniques applied to an implicitly flattened rotated sorted matrix.

  • medium
  • Fortinet
  • Coding & Algorithms
  • Software Engineer

Solve linked list reversal and minima problems

Company: Fortinet

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

You are given three independent coding tasks. ## 1) Reverse a singly linked list **Input:** The head of a singly linked list. **Output:** The head of the same list with nodes reversed. **Constraints / Notes:** - Aim for \(O(n)\) time. - Prefer \(O(1)\) extra space (iterative), but you may also discuss a recursive approach. --- ## 2) Find the minimum number in a rotated matrix Assume the matrix represents a *rotated sorted sequence* when read in row-major order: - If you flatten the \(m \times n\) matrix into an array in row-major order, that flattened array was originally sorted in strictly increasing order and then rotated (circularly shifted) by an unknown offset. **Input:** An \(m \times n\) integer matrix `mat` with `m,n >= 1` satisfying the property above. **Output:** The minimum value in the matrix. **Constraints / Notes:** - Target \(O(\log(mn))\) time by using binary search over the implicit flattened array. --- ## 3) Find the minimum value in a linked list **Input:** The head of a singly linked list of integers (not necessarily sorted). **Output:** The minimum integer value contained in the list. **Constraints / Notes:** - \(O(n)\) time, \(O(1)\) extra space. - Specify what to do if the list is empty (e.g., return `null`/raise an exception).

Quick Answer: This set of problems evaluates proficiency in fundamental data structures and algorithms, specifically linked list manipulation (reversal and linear-time minimum search) and binary-search techniques applied to an implicitly flattened rotated sorted matrix.

Fortinet logo
Fortinet
Jan 6, 2026, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
3
0
Loading...

You are given three independent coding tasks.

1) Reverse a singly linked list

Input: The head of a singly linked list.

Output: The head of the same list with nodes reversed.

Constraints / Notes:

  • Aim for O(n)O(n)O(n) time.
  • Prefer O(1)O(1)O(1) extra space (iterative), but you may also discuss a recursive approach.

2) Find the minimum number in a rotated matrix

Assume the matrix represents a rotated sorted sequence when read in row-major order:

  • If you flatten the m×nm \times nm×n matrix into an array in row-major order, that flattened array was originally sorted in strictly increasing order and then rotated (circularly shifted) by an unknown offset.

Input: An m×nm \times nm×n integer matrix mat with m,n >= 1 satisfying the property above.

Output: The minimum value in the matrix.

Constraints / Notes:

  • Target O(log⁡(mn))O(\log(mn))O(log(mn)) time by using binary search over the implicit flattened array.

3) Find the minimum value in a linked list

Input: The head of a singly linked list of integers (not necessarily sorted).

Output: The minimum integer value contained in the list.

Constraints / Notes:

  • O(n)O(n)O(n) time, O(1)O(1)O(1) extra space.
  • Specify what to do if the list is empty (e.g., return null /raise an exception).

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

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