There are rules which helps us to identify Big O notations. Rule 1 :- Worst case Rule 2 :- Remove Constants Rule 3 :- Different terms for input Rule 4 :- Drop Non dominants Rule 1: The very first role when it comes to big-O that is worst case when calculating big. if you look at above function we're looping through the entire array to find "rakesh". 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 package com . algo . practise ; import java.util.concurrent.TimeUnit ; public class Performance { public static void main ( String [] args ) { String ar [] = { "rks" , "rk" , "rakesh" , "singhania" , "kumar" }; long timeMilli1 = System . nanoTime (); for ( int i = 0 ; i < ar . length ; i ++) { System . out . println ( "Loop" ); if ( ar [ i ]. equals ( "rakesh" )) { System . out . p...
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 :) .