Alteryx | DSA

Result
Ongoing
Posted
15 Sept 2025
349 reads

Summary

I encountered these Data Structures and Algorithms questions during my interview process at Alteryx. The problems focused on finding specific subarrays and geometric calculations.

How it went

During my interview at Alteryx, I was presented with the following challenging Data Structures and Algorithms problems. The first question involved counting subarrays with a specific ratio of ones to zeros, which required careful array manipulation. The second problem was a geometry-based challenge, asking to count right-angled triangles formed by given coordinate points. I focused on detailing the problem statements as accurately as possible for future reference.

Questions asked (2)

  1. 01

    Total Binary Subarrays with Ratio x : y

    Data Structures & Algorithms

    You are given a binary array nums and two positive integers x and y.

    Your task is to count the number of contiguous subarrays of nums in which the number of 1s and 0s is in the exact ratio of x : y.

    Definition
    A subarray satisfies the ratio x : y if:
    count(1s) / count(0s) == x / y

    Input
    nums: an array of integers of length n (1 <= n <= 10^5), where each element is either 0 or 1.
    x: an integer (1 <= x <= 10)
    y: an integer (1 <= y <= 10)

    Output
    Return a single integer — the number of contiguous subarrays that satisfy the ratio condition x : y.

  2. 02

    Count Right Angled Triangles from Points

    Data Structures & Algorithms

    Given an array of xCordinates and yCordinates, get the count of right-angled triangles formed using those points.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Alteryx recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!