JAVA Solution explained in HINDI
https://youtu.be/X0tN5qi7Gnc\r\n\r\nFor explanation, please watch the above video and do like, share and subscribe the channel. \u2764\uFE0F\r\n\r\nSubscribe li
https://youtu.be/X0tN5qi7Gnc\r\n\r\nFor explanation, please watch the above video and do like, share and subscribe the channel. \u2764\uFE0F\r\n\r\nSubscribe link:- https://youtube.com/@quantumCode7?si=NzjWYmiCbqfFBUJE\r\n\r\nSubscribe Goal:- 100\r\nCurrent Subscriber:- 29\r\n# Code\r\n```\r\nclass Solution {\r\n    public int maxProductDifference(int[] nums) {\r\n        int biggest = 0;\r\n        int secondBiggest = 0;\r\n        int smallest = Integer.MAX_VALUE;\r\n        int secondSmallest = Integer.MAX_VALUE;\r\n\r\n        for(int num : nums) {\r\n            if(num > biggest) {\r\n                secondBiggest = biggest;\r\n                biggest = num;\r\n            }\r\n            else {\r\n                secondBiggest = Math.max(secondBiggest, num);\r\n            }\r\n\r\n            if(num < smallest) {\r\n                secondSmallest = smallest;\r\n                smallest = num;\r\n            }\r\n            else {\r\n                secondSmallest = Math.min(secondSmallest, num);\r\n            }\r\n        }\r\n        return biggest * secondBiggest - smallest * secondSmallest;\r\n    }\r\n}\r\n```
['Java']