목록해커랭크 (28)
규도자 개발 블로그
Objective Today, we're working with Binary Search Trees (BSTs). Check out the Tutorial tab for learning materials and an instructional video! Task The height of a binary search tree is the number of edges between the tree's root and its furthest leaf. You are given a pointer, , pointing to the root of a binary search tree. Complete the getHeight function provided in your editor so that it return..
Objective Today we're working with Linked Lists. Check out the Tutorial tab for learning materials and an instructional video!A Node class is provided for you in the editor. A Node object has an integer data field, , and a Node instance pointer, , pointing to another node (i.e.: the next node in a list).A Node insert function is also declared in your editor. It has two parameters: a pointer, , p..
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. It has a..
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 does the fo..
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 of Person..
Objective Today, we're building on our knowledge of Arrays by adding another dimension. Check out the Tutorial tab for learning materials and an instructional video!Context Given a 2D Array, :1 1 1 0 0 0 0 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 We define an hourglass in to be a subset of values with indices falling in this pattern in 's graphical representation:a b c d e f g T..
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 denoting the ..
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 function..
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 queried, p..
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 array 's..