Skip to main content

Posts

Showing posts with the label Hackerrank Algorithms

Diagonal Difference Hackerrank Solution - java

 Diagonal Difference Hackerrank Solution - java for explanation watch video : Code: import  java.io.*; import  java.math.*; import  java.security.*; import  java.text.*; import  java.util.*; import  java.util.concurrent.*; import  java.util.function.*; import  java.util.regex.*; import  java.util.stream.*; import   static  java.util.stream.Collectors.joining; import   static  java.util.stream.Collectors.toList; class  Result {      /*      * Complete the 'diagonalDifference' function below.      *      * The function is expected to return an INTEGER.      * The function accepts 2D_INTEGER_ARRAY arr as parameter.      */      public   static ...

Hackerrank Bill Division Solution - Java

Hackerrank Bill Division Solution - Java For Explanation Watch Video:: Code:: import  java.io.*; import  java.math.*; import  java.security.*; import  java.text.*; import  java.util.*; import  java.util.concurrent.*; import  java.util.function.*; import  java.util.regex.*; import  java.util.stream.*; import   static  java.util.stream.Collectors.joining; import   static  java.util.stream.Collectors.toList; class  Result {      /*      * Complete the 'bonAppetit' function below.      *      * The function accepts following parameters:      *  1. INTEGER_ARRAY bill      *  2. INTEGER k      *  3. INTEGER b      */ ...

Hackerrank Solve Me First Solution - Java | Hackerrank Algorithms

  Hackerrank Solve Me First Solution - Java For Explanation Watch Video:: Code:: import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution {     static int solveMeFirst(int a, int b) {       // Hint: Type return a+b; below            return a+b;    }  public static void main(String[] args) {         Scanner in = new Scanner(System.in);         int a;         a = in.nextInt();         int b;         b = in.nextInt();         int sum;         sum = solveMeFirst(a, b);         System.out.println(sum);    } }