Frequently Asked Java Program 18: How To Find Maximum & Minimum Values in Array

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2019
  • Topic : How To Find Maximum & Minimum Values in Array
    #########################
    Udemy Courses:
    #########################
    Manual Testing+Agile with Jira Tool
    ************************************
    ► shorturl.at/xNXZ4
    Selenium with Java+Cucumber
    ********************************
    ► shorturl.at/aIKMW
    Selenium with Python & PyTest
    ********************************
    ► shorturl.at/ELW09
    Selenium with python using Robot framework
    ****************************************
    ► shorturl.at/bcDPZ
    API Testing(Postman, RestAssured & SoapUI)
    *****************************************
    ► shorturl.at/uAWY7
    Web & API Automation using Cypress with Javascript
    ********************************************
    ► rb.gy/4uum2n
    Playwright with Javascript
    **************************
    ► shorturl.at/gALZ1
    Jmeter-Performance Testing
    ************************
    ► rb.gy/ocj7r2
    SDET Essencials(Full Stack QA)
    *************************
    ► rb.gy/hlnf2v
    Appium-Mobile Automation Testing
    ************************************
    ► rb.gy/wmzv64
    Java Collections
    *****************
    ► bit.ly/3S66ezE
    Python Programming
    *********************
    ► urlis.net/gdsfpb0s
    Cucumber BDD Framework
    ***************************
    ► bit.ly/3F7d69r
    Protractor with Javascript
    ***************************
    ► urlis.net/4uddm1qb
    ####################################
    TH-cam Playlists:
    ####################################
    Manual Testing & Agile
    ***********************
    ► bit.ly/3ujvaYa
    ► bit.ly/3OYzxQj
    SQL
    *************************
    ► bit.ly/3R6XjeG
    ► bit.ly/3nE0a1s
    ► bit.ly/3IeKuuJ
    linux & Shell Scripting
    **********************
    ► bit.ly/3up1Z6a
    ► bit.ly/3nzvGxx
    Java
    **********************
    ► bit.ly/3R9QfOs
    ► bit.ly/3AoRMKM
    ► bit.ly/3IbTTDn
    ► bit.ly/3ybXInv
    ► bit.ly/3yCoHdw
    Selenium With Java+Cucumber
    ********************************
    ► bit.ly/3P2FMm4
    ► bit.ly/3yhiIt4
    ► bit.ly/3uokzet
    ► bit.ly/3a7XIND
    ► bit.ly/3umN2S9
    ► bit.ly/3aar7GW
    ► bit.ly/3y9kD2S
    ► bit.ly/3uhLskn
    Python
    ********************************
    ► bit.ly/3agNgU0
    ► bit.ly/3NJNnoy
    ► bit.ly/2CTQ4mR
    ► bit.ly/3OIYWh1
    Selenium With Python,Pytest&Behave
    ***************************************
    ► bit.ly/3OHHoC9
    ► bit.ly/3IeNLdv
    ► bit.ly/2J4tPeT
    ► bit.ly/3ydSkAq
    Selenium With Python Using Robert Framework
    (Web&API Testing)
    *************************************************
    ► bit.ly/3nUvlpr
    ► bit.ly/3nUvE3z
    API Testing (Postman,SoapUi,&Rest Assured)
    **********************************************
    ► bit.ly/3OXacWY
    ► bit.ly/3yh0UhE
    ► bit.ly/3nC9DWQ
    ► bit.ly/3yGfhNS
    ► bit.ly/3OJa11H
    ► bit.ly/3P2slCC
    Mobile App Testing Appium
    ****************************
    ► bit.ly/3Al49HG
    Performance Testing Jmeter
    *******************************
    ► bit.ly/3nz4fE7
    Maven,Jenkins,Git,Github,CI/CD
    *******************************
    ► bit.ly/3P16HPj
    ► bit.ly/3yhlUVA
    ► bit.ly/3afYfwT
    ► bit.ly/3yGzweG
    ► bit.ly/3yF73Ws
    ► bit.ly/3NCOmH7
    SQL,DB Testing&ETL,Bigdata
    *******************************
    ► bit.ly/3NKOcNY
    ► bit.ly/3OVpDyI
    ► bit.ly/3NEvUy0
    ► bit.ly/3IryxlT
    ► bit.ly/3RkWBLh
    JavaScript Based Automation Tools
    ********************************
    ► bit.ly/3nUx51X
    ► bit.ly/3AqI6Q0
    ► bit.ly/3yeurbT
    ► bit.ly/3ujzpTK
    Selector Hub Tools
    ********************
    ►rb.gy/h3h424
    GraphQL
    ******************
    ► rb.gy/sj3gys
    Cypress API Testing
    ********************
    ► shorturl.at/fjKPX
    Cypress Web Testing
    **********************
    ► shorturl.at/agjlK
    Playwright with Javascipt
    **************************
    ► shorturl.at/adSTY
    #PythonMaxMinArray
    #ArrayMinMaxPython
    #MaxMinValues
    #ArrayOperations
    #PythonArrayManipulation
    #CodingPractice
    #ArrayAlgorithms
    #PythonProgramming
    #CodeExamples
    #AlgorithmSolutions
    #ArrayHandling
    #CodingInPython
    #TechInterviews
    #PythonCoding
    #ArrayFunctions
    #MinMaxSearch
    #ArrayChallenges
    #AlgorithmProblems
    #DataStructures
    #PythonTips
    #ArrayPuzzles
    #CodingCommunity
    #PythonLearning
    #AlgorithmExplained
    #ProgrammingInPython
    #ArraySearch
    #CodeSolutions
    #PythonSnippets
    #AlgorithmDesign
    #ArrayProblems
    #CodingJourney
    #PythonTricks
    #ArrayTips
    #ProblemSolving
    #PythonDevelopment
    #ArrayManipulation
    #CodingHelp
    #PythonArrays
    #AlgorithmicThinking
    #ArrayInterview
    #CodingSkills
    #PythonCodingTips
    #ArrayLogic
    #AlgorithmAnalysis
    #CodeLearning
    #PythonAlgorithm
    #ArrayExplained
    #ProgrammingTips
    #PythonSolutions
    #ArrayTricks

ความคิดเห็น • 70

  • @sultanalazzeh63
    @sultanalazzeh63 ปีที่แล้ว +12

    int[] array = {9, 80, 7, 5, 6};
    Arrays.sort(array);
    System.out.println("Max is: "+array[array.length-1]+'\t'+"Min is: "+ array[0]);

  • @abhishekbhardwaj7764
    @abhishekbhardwaj7764 3 ปีที่แล้ว +15

    This playlist is the most sensible playlist on java interview programs on entire TH-cam. Thanks

  • @madhukandukuri123
    @madhukandukuri123 3 หลายเดือนก่อน +3

    Arrays.sort(a); //sorts in ascending order
    Sysout(a[a.length-1]); -> max value
    Sysout(a[0]); -> minimum value

    • @MShijin1
      @MShijin1 3 วันที่ผ่านมา

      but it will take: Time complexity:- O(nlog n)
      Space complexity:- O(1)
      how can we do it with minimum camparison.

  • @Vikassingh-sv5tt
    @Vikassingh-sv5tt ปีที่แล้ว +3

    sir i am very grateful to you , you take my hole fear into the air😀 previously i don't know anything logic behind programming now i give interviews very confidently ❤ just one thing please make some experienced level interview programming question also THANK YOU Again from Uttar Pradesh....

  • @lololeona0993
    @lololeona0993 ปีที่แล้ว +4

    You explained this so well, and I am very thankful that you went step by step and explained more than once if you deemed necessary. Many teachers do not do this, and again, I am grateful that you do.

  • @rdxdevil5083
    @rdxdevil5083 7 หลายเดือนก่อน

    Thank u sir i didn't understand how this was possible but when you understood me then I got everything.....

    • @sdetpavan
      @sdetpavan  6 หลายเดือนก่อน

      You are most welcome

  • @bihari1422
    @bihari1422 2 ปีที่แล้ว +3

    Here we can combine both if loop inside for loop so that with same "for" iteration we can get max and min

  • @kundanwaghulde1709
    @kundanwaghulde1709 ปีที่แล้ว +1

    It is very very helpfull for beginners by your efforts somewhere someone is learning programming very effectively... thank you so much sir...

    • @sdetpavan
      @sdetpavan  ปีที่แล้ว

      You are most welcome

  • @nileshpardeshi7068
    @nileshpardeshi7068 4 ปีที่แล้ว +4

    Explained in a very simple way. Thanks, sir

    • @sdetpavan
      @sdetpavan  4 ปีที่แล้ว

      Thank you so much for your feedback. Please share my videos with your friends or colleagues.

  • @poojasharma-cc5ur
    @poojasharma-cc5ur 3 ปีที่แล้ว

    Thanku continue making videos on java plz

  • @yogeshjadhavybj5773
    @yogeshjadhavybj5773 ปีที่แล้ว +5

    Thanku You so much sir your best for increasing my programing logic.. and the playlist is very good thankyou from maharashtra..

  • @priyankapatil7014
    @priyankapatil7014 3 ปีที่แล้ว +1

    Explained in simple way..thank you so much...sir please upload more videos on string related java programs...

  • @tushardas1580
    @tushardas1580 ปีที่แล้ว +2

    Thank you Sir 🙏you explained logic very easily, I understood ❤. Keep doing Sir 🙏

  • @chinmoyeebhattacharjee2675
    @chinmoyeebhattacharjee2675 3 ปีที่แล้ว

    It will not work when 3 and 6 both are missing. can you please add the solution as well

  • @user-ev5pf9dm5f
    @user-ev5pf9dm5f ปีที่แล้ว

    for i=1 , a[i]>max =30>50 -> if condition is false so it continues the loop , until if condition becomes true then , sets the max to that value

  • @jayakarsappogu7301
    @jayakarsappogu7301 2 ปีที่แล้ว

    sir pls make a video in jaba 1St max,2nd max and 3rd max element from arrays

  • @rajeshbe2234
    @rajeshbe2234 8 วันที่ผ่านมา +1

    Thank you sir

    • @sdetpavan
      @sdetpavan  6 วันที่ผ่านมา +1

      Welcome

  • @manendrasinghyadav7099
    @manendrasinghyadav7099 2 ปีที่แล้ว

    Wonderful job sir!!!

  • @Errormakesmarter
    @Errormakesmarter 2 หลายเดือนก่อน +1

    Fabulous teaching sir pls some more playlist on logics and dsa

    • @sdetpavan
      @sdetpavan  2 หลายเดือนก่อน

      Thanks

  • @jayb2894
    @jayb2894 10 หลายเดือนก่อน +1

    Thank you sir!

    • @sdetpavan
      @sdetpavan  10 หลายเดือนก่อน

      Welcome

  • @amitaswal4129
    @amitaswal4129 4 ปีที่แล้ว +1

    You r doing great work

  • @whatisinthenameshakespeare0015
    @whatisinthenameshakespeare0015 2 ปีที่แล้ว +1

    There is a 2 liner solution...
    List lst = Arrays.asList(myArrayOfNumbers);
    int max = Collections.max(lst);
    int min = Collections.min(lst);

    • @bihari1422
      @bihari1422 2 ปีที่แล้ว +2

      Here idea was to develop logic by not using any pre defined methods

  • @shubhamshende9995
    @shubhamshende9995 9 หลายเดือนก่อน +1

    Amazing 🎉

    • @sdetpavan
      @sdetpavan  9 หลายเดือนก่อน

      Thanks

  • @gayathridhana1000
    @gayathridhana1000 ปีที่แล้ว +1

    Useful Thanku

  • @swayamprakashbhuyan2580
    @swayamprakashbhuyan2580 2 ปีที่แล้ว +2

    Commenting for better reach

  • @SurajSingh-sy9kr
    @SurajSingh-sy9kr ปีที่แล้ว +1

    very helpful video sir

  • @cirrusar3498
    @cirrusar3498 2 ปีที่แล้ว

    Here for both min and Max time complexity is n^2. So is there any other solution where we can reduce time complexity?

    • @sultanalazzeh63
      @sultanalazzeh63 ปีที่แล้ว +1

      int[] array = {9, 80, 7, 5, 6};
      Arrays.sort(array);
      System.out.println("Max is: "+array[array.length-1]+'\t'+"Min is: "+ array[0]);

  • @informationtechnology7114
    @informationtechnology7114 ปีที่แล้ว +1

    Very helpful sir

    • @sdetpavan
      @sdetpavan  ปีที่แล้ว

      Glad to hear that

  • @snehalwakode5291
    @snehalwakode5291 ปีที่แล้ว +1

    Thank u sir🙏

  • @layan2524
    @layan2524 ปีที่แล้ว +1

    Thank you so much 💗

    • @sdetpavan
      @sdetpavan  ปีที่แล้ว

      You're so welcome!

  • @manalloumana5086
    @manalloumana5086 8 หลายเดือนก่อน +1

    thank you

    • @sdetpavan
      @sdetpavan  8 หลายเดือนก่อน

      You're welcome

  • @MohammedAli-lz3sn
    @MohammedAli-lz3sn 3 ปีที่แล้ว +2

    great video

  • @tilakpednekar9905
    @tilakpednekar9905 11 หลายเดือนก่อน +1

    well explained

    • @sdetpavan
      @sdetpavan  10 หลายเดือนก่อน

      Thanks

  • @RakeshKumar-ox5hx
    @RakeshKumar-ox5hx ปีที่แล้ว

    sir kindly update this list

  • @jitendrapatro2930
    @jitendrapatro2930 4 ปีที่แล้ว +1

    Sir please add frequently asked python programs

    • @sdetpavan
      @sdetpavan  4 ปีที่แล้ว +1

      Coming soon.

  • @TeoBounce
    @TeoBounce 6 หลายเดือนก่อน

    but this is so expensive and can be done much more efficiently

  • @Khater-khan
    @Khater-khan ปีที่แล้ว

    salute

  • @neelmoradiya1389
    @neelmoradiya1389 ปีที่แล้ว +1

    🇮🇳🇮🇳🙏🙏👍👍

  • @kvelez
    @kvelez 10 หลายเดือนก่อน

    package javaapplication23;
    import java.util.ArrayList;
    import java.util.Scanner;
    public class JavaApplication23 {
    public static void main(String[] args) {
    int[] a = {1,2,3};
    int[] b = {1,2,3,4};

    System.out.println(Math.max(0, a.length));
    System.out.println(Math.max(0, b.length));

    }

    }

    • @hamer4674
      @hamer4674 6 หลายเดือนก่อน

      This code will only work if you don't have to input array elements into scanner an all your numbers are presumed to be over 0

  • @abhishekbhardwaj7764
    @abhishekbhardwaj7764 3 ปีที่แล้ว

    This playlist is the most sensible playlist on java interview programs on entire TH-cam. Thanks

  • @swayamprakashbhuyan2580
    @swayamprakashbhuyan2580 2 ปีที่แล้ว +1

    Commenting for better reach