Big-O Analysis of Algorithms The Big O notation defines an upper bound of an algorithm, it bounds a function only from above. Don't get too hung up on this. We want to use this as an example to measure how long it takes for this function to run. We can do this in Java by saying let's say Time0 is going to start this timer before the loop happens. And then when the loop ends I'm going to have another timer called T-1 package com. algo . practise ; import java.util.Arrays ; import java.util.concurrent.TimeUnit ; public class Performance { public static void main (String[] args) { String ar[] = { "rks" , "rk" , "rakesh" , "singhania" , "kumar" }; // Returns current time in millis long timeMilli1 = System. nanoTime (); for ( int i = 0 ; i < ar. length ; i++) { if (ar[i]. equals ( "rakesh" )) { System. out . println ( "found" ); } } long timeMil...
A Full Stack developer who is facing problems in development cycle and here you find solution of errors of those problems.This includes all exception and configuration issues. Solutions which i have written in blog are the one which worked for me after killing my time :) .