Mail-Taral Sakshi (Contractor x C 43m left ALL Ⓡ H 5 HackerRank Question - Product X hackerrank.com/test/eifsidn6q35/que

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Mail-Taral Sakshi (Contractor x C 43m left ALL Ⓡ H 5 HackerRank Question - Product X hackerrank.com/test/eifsidn6q35/que

Post by answerhappygod »

Mail Taral Sakshi Contractor X C 43m Left All H 5 Hackerrank Question Product X Hackerrank Com Test Eifsidn6q35 Que 1
Mail Taral Sakshi Contractor X C 43m Left All H 5 Hackerrank Question Product X Hackerrank Com Test Eifsidn6q35 Que 1 (72.45 KiB) Viewed 30 times
solve in java 8 in 30 minutes
solve in java 8
Mail-Taral Sakshi (Contractor x C 43m left ALL Ⓡ H 5 HackerRank Question - Product X hackerrank.com/test/eifsidn6q35/questions/dg08j7bqka Info DETA) Can't read the text? Switch theme 4. Product of the Maximum and Minimum in a Dataset Starting with an empty set of integers named elements, perform the following query operations: • The command push x inserts the value of xinto elements. . The command pop x removes the value of x from elements. The integers in elements need to be ordered in such a way that after performing each operation, the product of the maximum and minimum values in the set can be easily calculated. Function Description Complete the function maxMin in the editor below. maxMin has the following parameter(s): string operations[n]: an array of operations strings int x[n]: an array of x where x goes with operations. Type here to search O C Learning Path 2 Autocomplete Ready 20 INTEGER ARRAT A 26 27 28 public static List<long> maxMin(List<string> operations, List<int> x) 29 { 30 List<long> arraunau List<long>(); 31 List<long System.Int64 ew List<long>(); 32 long max-long. MinValue; 33 long min=long.MaxValue; 34 35 36 for (int i=0; i<operations.Count(); i++) { if(operations.Equals("push")) { elements.Add(long)xfil): 37 Test Results Custom Input Compiled successfully. All available test cases passed Test case 8 8 Input (stdin) Test case 9 8 1 4 2 push Test case 10 8 3 4 push push pop Test case 11 A 5 6 4 Test case 12 A 7 1 9 X QU L Run Code ☐ I 0 Ⓒ ⠀ Line: 16 Col: 1 Submit Run Tests Run as Custom Input | Download ENG 4:47 PM ADA IN 3/31/2022 E
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply