Sample Scala Functions

posted in: Scala | 0

Write a function of x power y. def power (x:Int, n:Int):Int = if ( n==0) 1 else if(n>0 && n%2 == 0) power(x, n/2) * power(x,n/2) else x * power(x, n – 1) Write QuickSort in Scala def sort(xs: Array[Int]): … Continued

Scala Interview Questions

posted in: Scala | 8

Scala stands for Scalable language. It’s a functional oriented programming language. Recently it’s spread it’s roots in all major languages like Apache Spark, Akka. What is difference between abstract class and traits in Scala? A class that extend another subClass … Continued

error: Content is protected !!