← All problemsSign in

1622. Fancy Sequence

LeetCodeMathDesignSegment TreeNumber TheoryOpen on judge ↗

Write an API that generates fancy sequences using the append, addAll, and multAll operations. Implement the Fancy class: - Fancy() Initializes the object with an empty sequence. - void append(val) Appends an integer val to the end of the sequence. - void addAll(inc) Increments all existing values in the sequence by an integer inc. - void multAll(m) Multiplies all existing values in the sequen

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start