Cohesity

Online Assessment

CohesityOnline Assessment

Company-style OA practice sets with full problem statements, sample test cases, and solutions.

5 Sets2 Questions/Set90 minHash TableLinked ListDesignDoubly-Linked ListArray

💰 Contribute & Earn

Have you recently taken Cohesity's Online Assessment or coding test? Share the questions, test cases, or assessment patterns you encountered. Earn SWE180 Coins for every verified submission and use them to unlock other company OA sets and premium tools for free!

Share OA & Earn Coins ➔

Practice Sets

Cohesity Software Engineer Online Assessment — 2026

2 questions
Medium

Problem Statement

Given an array arr, find the subsequence (minimum length 2) with the maximum sum, such that the first and last elements of the subsequence are equal.

A subsequence of an array is an ordered subset of the array's elements having the same sequential ordering as the original array.

Return the maximum possible sum of such a subsequence.

Input Format

  • arr: an array of integers.

Output Format

  • A single integer: the maximum sum of a valid subsequence (length ≥ 2, first element == last element).

Constraints

  • 1 ≤ len(arr) ≤ 10^5
  • -10^5 ≤ arr[i] ≤ 10^5

Sample Test Cases

Example 1

Input

arr = [1000, 100, 1, 2, -1, 1]

Output

4

Explanation

The only equal pair is the two 1s, at indices 2 and 5.

Take both 1s, keep the positive 2 between them and skip the -1: [1, 2, 1].

The sum is 1 + 2 + 1 = 4.

Time:O(n)
Space:O(n)
Approach:Between the two equal ends, take every positive element and skip every negative one. Let P[k] be the sum of max(0, arr[t]) for t < k. For a right end j with value v, the best sum is v + P[j] + max over earlier i with arr[i] = v of (v - P[i + 1]). Keep that maximum per value in a hash map while scanning left to right.
Q2.
Minimize Maximum Truck Load
Binary SearchArraysGreedy
Medium

Problem Statement

Rohit's company produces machines of different weights. The factory produces N machines every day. Each machine is kept in a separate room, and all N rooms are arranged in a line.

k trucks arrive at the factory every day to transport those machines. Each truck can carry one or more machines but will never leave empty.

The workers prefer the truck to be present nearer to the machines it needs to load, so a truck will only carry machines housed in rooms that are next to each other (a contiguous segment).

The truck owner doesn't want his trucks to be overloaded, so he wants the machines distributed among the k trucks such that the maximum weight in a truck is minimized.

The rooms are given as an array a, where a[i] is the weight of the i-th machine. Return the minimum possible value of the maximum weight carried by a single truck.

Input Format

  • a: an array of N integers, the machine weights in room order.
  • k: the number of trucks.

Output Format

  • A single integer: the minimized maximum load of any truck.

Constraints

  • 1 ≤ k ≤ N (approximate; the exact bounds were not visible in the OA screenshot)
  • 1 ≤ a[i] (approximate)

Sample Test Cases

Example 1

Input

a = [7, 2, 5, 10, 8]
k = 2

Output

18

Explanation

Split the rooms into [7, 2, 5] and [10, 8].

The loads are 14 and 18, so the maximum load is 18.

No other split into 2 contiguous groups has a smaller maximum.

Time:O(N log(sum(a)))
Space:O(1)
Approach:Binary search on the answer between max(a) and sum(a). For a candidate capacity m, greedily fill trucks left to right, starting a new truck whenever the next machine would exceed m. If at most k trucks are needed, m is feasible, so search lower; otherwise search higher. Same as LeetCode 410 (Split Array Largest Sum).

Comprehensive Cohesity Online Assessment Patterns & Questions

Gain complete transparency into the Cohesity online assessment process. Prepare effectively with real, verified coding challenges, test patterns, and platform details.

Cohesity Exact Coding Questions

Wondering what top companies are actually asking in their initial screening rounds? We provide exact Data Structures, Algorithms, and logical reasoning questions reported by candidates who recently took the Cohesity online tests. Stop guessing and start practicing the right problems.

Test Patterns & Platforms

Understand exactly how many questions to expect, the typical time limits, and the platforms used (e.g., HackerRank, Codility, CodeSignal). Knowing the format in advance is the first step to clearing the Cohesity OA.

🔥 Why practice these assessments?

  • ✓High ROI: Most candidates are filtered out at the OA stage. Passing the OA guarantees an interview.
  • ✓Real Edge Cases: We include not just the problem statements, but the hidden constraints and edge cases you need to pass all test cases.
  • ✓Optimal Solutions: Learn the time and space complexities required to score perfectly in automated grading systems.