Skip to content
the poor coder

Home / Topics / #hackerrank

#Hackerrank

419 posts · page 3 of 21
2020

Hackerrank Currying Solution

Currying is a technique in which a function accepts parameters and turns it into a sequence of functions, each of them take 1 parameter. Example :- In the above example, lambda take two parameters , and return the…

2020

Hackerrank Closures Solution

Closure is a function/method that: ► Can be passed around like an object. It can be treated like a variable, which can be assigned to another variable, passed as an argument to a method. ► Remembers the value of…

2020

Hackerrank Lambdas Solution

Lambdas are anonymous functions. Lambdas in Ruby are objects of the class Proc. They are useful in most of the situations where you would use a proc. The simplest lambda takes no argument and returns nothing as shown…

2020

Hackerrank Procs Solution

Passing blocks is one way to pass functions as arguments to other functions. Blocks are one of the very few exceptions to the "everything is an object" rule in Ruby. Blocks are not objects, and they can't be saved to…

2020

Hackerrank Blocks Solution

Higher order functions are one of the key components of functional programming. A higher order function is a tool that takes other functions as parameters or returns them as a result. Blocks are nameless methods that…

ESC