본문 바로가기

1 Day 1 Algorithms65

[2018.12.28] Scope Problem Objective Today we're discussing scope. Check out the Tutorial tab for learning materials and an instructional video!The absolute difference between two integers, and , is written as . The maximum absolute difference between two integers in a set of positive integers, , is the largest absolute difference between any two integers in .The Difference class is started for you in the editor. .. 2018. 12. 28.
[2018.12.27] Abstract Classes Problem Objective Today, we're taking what we learned yesterday about Inheritance and extending it to Abstract Classes. Because this is a very specific Object-Oriented concept, submissions are limited to the few languages that use this construct. Check out the Tutorialtab for learning materials and an instructional video!Task Given a Book class and a Solution class, write a MyBook class that doe.. 2018. 12. 27.
[2018.12.26] Inheritance Problem Objective Today, we're delving into Inheritance. Check out the attached tutorial for learning materials and an instructional video!Task You are given two classes, Person and Student, where Person is the base class and Student is the derived class. Completed code for Person and a declaration for Student are provided for you in the editor. Observe that Student inherits all the properties o.. 2018. 12. 26.
[2018.12.21] Binary Numbers Problem Objective Today, we're working with binary numbers. Check out the Tutorial tab for learning materials and an instructional video!Task Given a base- integer, , convert it to binary (base-). Then find and print the base- integer denoting the maximum number of consecutive 's in 's binary representation.Input FormatA single integer, .ConstraintsOutput FormatPrint a single base- integer denot.. 2018. 12. 21.
[2018.12.20] Recursion 3 Problem Objective Today, we're learning and practicing an algorithmic concept called Recursion. Check out the Tutorial tab for learning materials and an instructional video!Recursive Method for Calculating Factorial Task Write a factorial function that takes a positive integer, as a parameter and prints the result of ( factorial).Note: If you fail to use recursion or fail to name your recursive .. 2018. 12. 21.
[2018.12.19] Mini-Max Sum Problem Given five positive integers, find the minimum and maximum values that can be calculated by summing exactly four of the five integers. Then print the respective minimum and maximum values as a single line of two space-separated long integers.For example, . Our minimum sum is and our maximum sum is . We would print16 24 Function DescriptionComplete the miniMaxSum function in the editor be.. 2018. 12. 19.
[2018.12.19] Dictionaries and Maps Problem Objective Today, we're learning about Key-Value pair mappings using a Map or Dictionary data structure. Check out the Tutorial tab for learning materials and an instructional video!Task Given names and phone numbers, assemble a phone book that maps friends' names to their respective phone numbers. You will then be given an unknown number of names to query your phone book for. For each qu.. 2018. 12. 19.
[2018.12.18] Staircase Problem Consider a staircase of size : # ## ### #### Observe that its base and height are both equal to , and the image is drawn using # symbols and spaces. The last line is not preceded by any spaces.Write a program that prints a staircase of size .Function DescriptionComplete the staircase function in the editor below. It should print a staircase as described above.staircase has the following .. 2018. 12. 18.
[2018.12.18] Arrays Problem Objective Today, we're learning about the Array data structure. Check out the Tutorial tab for learning materials and an instructional video!Task Given an array, , of integers, print 's elements in reverse order as a single line of space-separated numbers.Input FormatThe first line contains an integer, (the size of our array). The second line contains space-separated integers describing .. 2018. 12. 18.