Find maximum element in an array (Largest element)

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024
  • Write code to find largest /maximum element in an array.

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

  • @dongiveajack
    @dongiveajack 3 ปีที่แล้ว +19

    Khyade sir is the best

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

    Great video. It’s sometimes difficult to turn your idea into code. This was well explained and way more simple than my solution. Thank You.

  • @pandurangvadane443
    @pandurangvadane443 6 ปีที่แล้ว +17

    Sir , it is difficult to understand me this algorithm . But after watching this Videos , I easyly understand the logic . THANK You sir

    • @MSKmr-jh2hq
      @MSKmr-jh2hq ปีที่แล้ว

      th-cam.com/video/oa1ziyOP63Y/w-d-xo.html

  • @kimlengkoko730
    @kimlengkoko730 3 ปีที่แล้ว +19

    Indian programmer always save the world

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

    hey, brother, I am from Tanzania, you are genius, this was one of difficult part in my c++ class but now see no more cramming, god bless you , programing is not difficult unless you meet wrong teacher, big uppppp

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

    i don't know why i couldn't figure this out on my own, but this made me understand what I was doing so well. Thank you so much.

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

    Who does this, who explains a code like this so simply and effortlessly , it's all we need as students ,to get the logic and being able to explain it ourselves to the layman on the street, you explain these algorithms better than my professor, thanks a lot.

    • @MSKmr-jh2hq
      @MSKmr-jh2hq ปีที่แล้ว

      th-cam.com/video/oa1ziyOP63Y/w-d-xo.html

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

    im so grateful i now understand arrays better than before

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

      happy for you,i as well
      Jesus loves you
      He's the son of God
      Believe in him and repent

  • @Hiteshkumar-xg8br
    @Hiteshkumar-xg8br 3 ปีที่แล้ว

    Your way of teaching is good I was confusing now I am clear.

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

    I really appreciate the way you teach............keep up ur good Job!

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

    If you use int max = 0 instead of int max = arr[0] in your code, it might not work correctly in all cases, especially when the array contains only negative numbers. We can't consider 0 as a least element , if we are using arr[0] we are comparing with first element of array.

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

    Clean comprehensible code. NICE!

  • @מחמודשלבי-ח6ר
    @מחמודשלבי-ח6ר 4 ปีที่แล้ว +1

    you are the top thank you very much sir you saved my semester. God bless you

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

    well done sir , you just simplify the concept , Thats the quality of a good teacher........
    Good bless you.......🥰🥰🥰🥰🥰

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

    I enjoyed this video because the logic was explained in detail and simple demonstrating each step. For that, I subscribed.

  • @Pedro-bu8xd
    @Pedro-bu8xd ปีที่แล้ว

    Very clearly explained... Bravo Sir

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

    Thnku so much sir 😊😊you explanation is too much good 👍

  • @ZiaShah-k3d
    @ZiaShah-k3d 8 หลายเดือนก่อน

    Thanks a lot sir I really confused about this program but now I understand it well thanks again stay blessed

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

    thankyou so much Sir. I am so confused but after watching your video I got it. thankyou Sir.

  • @PrakashKumar-pf5st
    @PrakashKumar-pf5st 3 ปีที่แล้ว +2

    what is meaning of--- o(n) time complexcity, sir.

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

    thankyou mister, it's so understandable
    love your content. keep going!

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

    A good one ,can i find a video on passing arrays to functions

  • @1997-aic
    @1997-aic ปีที่แล้ว

    What a great and easy explain sir, thank you ❤

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

    very nice explained. thank you

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

    Very Understandable... Hope you can make lots of videos it's really helpful ❤️❤️❤️

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

    Hi ,how to find out the maximum 10 values in array in one column of about 100 rows and how to right it in metastock thanks

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

    please tell me checking the divisibility of 11 without using num modulus 11. for example 20449 is divisible by 11. logic is sum of digits at odd places is 2+4+9 =15.sum of digits at even places is 0+4 =4. . sum at odd places - sum at even places is 0 or 11 0r 22 or things like that then the number is divisible by 11. I think that it should be implemented by using arrrays. another point to be noted is that we can use modulus to separate the digits of the number from the back by using the logic of sum of digits of a number. i will be highly obliged.

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

    How to draw the Flowchart of this algorithm?

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

    great explanation sir thankyou

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

    Please help me on this question "Finding the duplicate numbers in an array of 10"

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

    Very great explanation ❤

  • @Doxa-wl4hb
    @Doxa-wl4hb 3 หลายเดือนก่อน

    Great explanation!

  • @Arella-r4k
    @Arella-r4k ปีที่แล้ว

    pleaase help me on this (only single-time scanning values while so sorting arrays)
    question: input arr =[1,0,2,0,2,1,3,4,5]
    output:[0,0,1,1,2,2,3,4,5] but Here only single scanning not repeating the array elements comparison while sorting the array

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

    very help full video , keep it up sir

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

    Thank you sir for explaining properly.

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

    Hello Sir
    i just love your videos...
    make video on following topics...as u miss it out
    1.TSP(Dynamic approach)
    2.TSP(Branch & bound)
    3.and most imp np hard and np complete problem

    • @MSKmr-jh2hq
      @MSKmr-jh2hq ปีที่แล้ว

      th-cam.com/video/oa1ziyOP63Y/w-d-xo.html

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

    I love it you teach so well sir🙏🙏😌

  • @DiyanDevaiah-tm8eh
    @DiyanDevaiah-tm8eh ปีที่แล้ว

    given a array DATA with N numerical values, this algorithm finds the location LOC and the value MAX of the largest element of DATA in data structure (solution for this question)

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

    Thanks alot sir i was having difficulty with this program but after watching your video i got the idea how to do it

  • @DaSnipy
    @DaSnipy 5 ปีที่แล้ว

    thanks :) .. very clear explanation. Do you have a website ?

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

    You are very good brother

  • @MB-gg3ph
    @MB-gg3ph ปีที่แล้ว

    Hi sir, while I am taking max= 20 ( randomly bigger number) output is not changing. (Its bigger number presented in array) how this is happening???

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

    nice bro
    Create a program that stores 20 numbers into a multi dementional array and find the largets stored number

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

    Wow ur teacher is nice

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

    Fan from Guadalajaran, Mexico. How to find the largest number in a matrix?

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

    Write a program to find the maximum and minimum of an array of 10 elements of user given array
    Can you write it sir?

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

    Thank you so much this indeed clear and well thought, Also like we can solve this with mathematical way right which makes the process way easier.

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

    Hi pls explain the algorithm to reverse array element using temp variable

  • @IslamicWorld-ox2dv
    @IslamicWorld-ox2dv ปีที่แล้ว

    Thanks sir please make more videos!!

  • @jalalajlan5338
    @jalalajlan5338 5 ปีที่แล้ว

    very good explanation. so perfect

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

    Thank you so much very well explained. Keep it up!

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

    nice video thanks

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

    sir, how to write algorithm to find the largest value in array by recursion

  • @Tbm4545
    @Tbm4545 5 หลายเดือนก่อน

    Waiylt but wht if all nos r negative this will give 0 as output which is not even present inthe array
    My suggestion is insted of max = 0 keep max = arr[0]

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

    please upload a video on finding minimum element

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

    Well explained sir

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

    thanks for explanation sir

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

    Thanks sir from USA

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

    How can I also print the location of the max

  • @engr.naveedafzal
    @engr.naveedafzal 4 ปีที่แล้ว

    plz share divide and conquer (recursion) method for finding max element

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

    Excellent vid :)

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

    If each element is

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

      Yeah, was wondering the same. Do you got any idea to generalise this for an array containing positive and negative numbers both. I am new to programming.

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

      use max=array[0] instead

  • @firibuanyass
    @firibuanyass 6 ปีที่แล้ว

    You are the best. I would like videos on EULER , AND HAMILTON theory!!!!

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

    Please also make algorithm on second largest

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

    Tq sir,, understood easily

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

    Please do pattern program also please.... If u have already dun please share the link

  • @meetshah4473
    @meetshah4473 6 ปีที่แล้ว

    Sir plz make the video of c program/algorithm to interchange largest and smallest number in an array using function

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

    Thank you ❤️

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

    Thnks very useful

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

    Make video on array rotation problem

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

    Please or video daliye simple question iteration ki

  • @pandurangvadane443
    @pandurangvadane443 6 ปีที่แล้ว

    Sir i request to u plzzz make 1 video on reversing for loop . How to reverse stack.

    • @MSKmr-jh2hq
      @MSKmr-jh2hq ปีที่แล้ว

      th-cam.com/video/oa1ziyOP63Y/w-d-xo.html

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

    thank you

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

    salamat idol

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

    Hi Sir, why do you max = 0?

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

    please do a video on kth largest/smallest element in an array...

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

    Thankyou 😊

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

    Thank you

  • @polinal4769
    @polinal4769 5 ปีที่แล้ว

    Thank you!

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

    Subscribed :)

  • @NadiaKanwal-mm6zp
    @NadiaKanwal-mm6zp 2 หลายเดือนก่อน

    Thank you sir😊😊😊😊😊😊

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

    sir please make a video on graph

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

    Here how we can store the maximum element into another variable like x

  • @rekildo
    @rekildo 6 ปีที่แล้ว

    Superb👍

  • @aadilchan5338
    @aadilchan5338 6 ปีที่แล้ว

    Kindly make video on Graph.

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

    sir tuse great ho

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

    but there is a problem when we choose -ve integers then it will return 0 as the max element

    • @zaby2301
      @zaby2301 21 วันที่ผ่านมา

      Can you explain the question more

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

    thanks u so much

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

    Thank you Teacher

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

    sir make videos in hindi...it will be very helpfull...and there are more chances of video to reach to every one

    • @dishadisha2553
      @dishadisha2553 4 หลายเดือนก่อน

      You think that national language is Hindi,baka come to sense

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

    Thanks

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

    Thanks sir

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

    Super sir❤

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

    Thanku sir❤

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

    thank you sir

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

    Check if there is only one element in the array

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

    😮❤❤

  • @riteshmalav2448
    @riteshmalav2448 6 ปีที่แล้ว

    Beacuse code understand some time not run so provide code link and show last time in vedio code in id

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

    thanks sir

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

    🥰