# [Practice Problem 1] Maximum Value # Given N distinct natural numbers, write a program to find the maximum value # and determine its position (index) in the sequence. # Input # 9 # 3 29 38 12 57 74 40 85 61 # Output # 85 # 8 # ============================== # [Practice Problem 2] Number of Pairs with Difference K # Given N numbers, find the number of pairs # where the difference between the two numbers is exactly K. # Input Example # 5 2 (N numbers, Difference K) # 1 5 3 4 2 (The N numbers) # Output Example # 3 # ============================== # [Practice Problem 3] Sum of 3 Cards (Brute Force Core) # From N cards, choose 3 distinct cards such that # their sum is the largest possible value that does not exceed M. # Input Example # 5 21 # 5 6 7 8 9 # Output Example # 21 # ============================== # [Practice Problem 4] Furthest Cards # Given N cards, # find the maximum difference between any two card values. # Input Example # 6 # 10 3 25 7 15 1 # Output Example # 24
To embed this project on your website, copy the following code and paste it into your website's HTML: