leetle

Daily challenge for 2025-07-16

197. Find First Non-Zero Element

Write a function solve that takes a list of integers and returns the first non-zero element. If all elements are zero or the list is empty, return 0.

Example:
Input: [0, 0, 3, 0, 5]
Output: 3

Run this challenge interactively in Python or JavaScript when the app loads.