Least Operators to Express Number at Snapchat

Hard48.6% acceptance

This problem has 87.5% frequency at Snapchat.

Problem Description

Given a single positive integer `x`, we will write an expression of the form `x (op1) x (op2) x (op3) x ...` where each operator `op1`, `op2`, etc. is either addition, subtraction, multiplication, or division (`+`, `-`, `*`, or `/)`. For example, with `x = 3`, we might write `3 * 3 / 3 + 3 - 3` whic...

Read full problem and hints

Topics


More Snapchat Questions

View all Snapchat questions