cpp

[Solved] To the Magic Show with Java, C++

[Solved] To the Magic Show with Java, C++

To the Magic Show: The Magic Castle, the home of the Academy of Magical Arts has organized the great ‘WonderWorks Magic Show’. Renowned magicians were invited to mystify and thrill the crowd with their world’s spectacular magic tricks. Rahul has…

[Solved] Entrance Test with Java, C++

[Solved] Entrance Test with Java, C++

“Success Academy” has arranged for a entrance test for High School students from rural villages. Those successful students of the test will be awarded the scholarship for their IIT/JEE preparations at Success Academy. Sunil, the co-coordinator and founder of the…

[Solved] Command Line Argument Count with Java, C++

[Solved] Command Line Argument Count with Java, C++

Command Line Argument Count: Write a program to accept strings as command line argument and print the number of arguments entered. Sample Input (Command Line Argument) 1:Command Arguments Sample Output 1:Arguments :CommandArgumentsNumber of arguments is 2 Sample Input (Command Line…

[Solved] Minimum Sum of Squared Difference LeetCode Contest

[Solved] Minimum Sum of Squared Difference LeetCode Contest

Minimum Sum of Squared Difference: You are given two positive 0-indexed integer arrays nums1 and nums2, both of length n. The sum of squared difference of arrays nums1 and nums2 is defined as the sum of (nums1[i] – nums2[i])2 for each 0 <= i < n. You are also given two positive integers k1 and k2. You can modify any…

[Solved] The Latest Time to Catch a Bus LeetCode Contest

[Solved] The Latest Time to Catch a Bus LeetCode Contest

The Latest Time to Catch a Bus: You are given a 0-indexed integer array buses of length n, where buses[i] represents the departure time of the ith bus. You are also given a 0-indexed integer array passengers of length m, where passengers[j] represents the arrival time of the jth passenger. All bus departure times are unique. All passenger…

[Solved] Evaluate Boolean Binary Tree LeetCode Contest

[Solved] Evaluate Boolean Binary Tree LeetCode Contest

Evaluate Boolean Binary Tree: You are given the root of a full binary tree with the following properties: Leaf nodes have either the value 0 or 1, where 0 represents False and 1 represents True. Non-leaf nodes have either the value 2 or 3, where 2 represents the boolean OR and 3 represents the boolean AND. The evaluation of a node is as follows: If the node is…