HP Inc. Interview Question

Code problem and regular interview questions related to the JD