simple solution and simple logic in js and  Python
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n\n# Complexity\n- Tim
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n![image.png](https://assets.leetcode.com/users/images/5e28541b-5594-4394-9c67-4529b69a80b3_1700117912.3603415.png)\n\n# Complexity\n- Time complexity: **54**\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: **42.23**\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/**\n * @param {number[]} nums\n * @return {number}\n */\nvar maximumDifference = function(nums) {\n    if(nums.length <2){\n        return -1\n    }\n    let s =-1\n    \n    for(let i=0;i<nums.length;i++){\n        for(let j=i+1;j<nums.length;j++){\n            if(nums[i]<nums[j]){\n                s=Math.max(s,nums[j]-nums[i])\n            }\n        }\n    }\n    return s\n};\n```
['Python', 'JavaScript']