You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Understand what the interviewer is asking for by using test cases and questions about the problem.
Will the list always contain only numbers?
Yes.
P-lan
Plan the solution with appropriate visualizations and pseudocode.
General Idea: Loop through a list of numbers, and count how many numbers in the list are less than a given threshold.
1) Create a function with parameters for the list and threshold
2) Initialize a counter variable to zero
3) Loop through the input list
a) If the element is less than the threshold, add 1 to the counter
4) Return the counter