⌘K
Flycodx

Mutual Fund NAV Portfolio Growth Tracker

Mutual Fund NAV Portfolio Growth Tracker

MediumArrays0% accepted

Ravi invests in mutual funds through a Bangalore platform and tracks his portfolio NAV daily. He wants to analyze his portfolio by counting positive growth days and identifying the maximum single-day gain.

Approach

Given an array of daily NAV values, find count of days with positive growth compared to previous day and maximum single-day gain.

Input

5 100 105 103 110 115

Output

[3,7]
solution.py
Loading editor...
Test 1
Test 2
Test 3

Press Run to test your custom input, or Submit to judge against all test cases.

Sign in to continue

Create a free account to run code, submit solutions and track progress.

  • Free forever — no credit card
  • 10+ languages with live execution
  • Points, streaks & leaderboards
Auto Save OnLn 1, Col 1Spaces: 4UTF-8LFPython 3