FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Find Minimum and Maximum Elements in an Array Using Python
NewsProgramming Languages

Find Minimum and Maximum Elements in an Array Using Python

via Dev.to TutorialTharunya K R3h ago

Find Minimum and Maximum Elements in an Array (Python) Problem Given an array arr[], find the minimum and maximum elements. Example Input arr = [1, 4, 3, 5, 8, 6] Output [1, 8] Explanation: Minimum = 1, Maximum = 8 Approach Assume the first element as minimum and maximum. Traverse the array. Update minimum if a smaller value is found. Update maximum if a larger value is found. Python Code class Solution: def getMinMax(self, arr): min_val = arr[0] max_val = arr[0] for num in arr: if num < min_val: min_val = num if num > max_val: max_val = num return [min_val, max_val] Output [1, 8]

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
0 views

Related Articles

12 Best Coffee Subscriptions (2026), Tested by Caffeine Hounds
News

12 Best Coffee Subscriptions (2026), Tested by Caffeine Hounds

Wired • 9m ago

Do Not Buy the MacBook Neo. Here’s Why.
News

Do Not Buy the MacBook Neo. Here’s Why.

Medium Programming • 10m ago

The End of an Era: How 15 Months of Impermanent Loss Protection Changed TON DeFi
News

The End of an Era: How 15 Months of Impermanent Loss Protection Changed TON DeFi

Medium Programming • 21m ago

Mexico City's 'Xoli' Chatbot Will Help World Cup Tourists Navigate the City
News

Mexico City's 'Xoli' Chatbot Will Help World Cup Tourists Navigate the City

Wired • 41m ago

My Journey into Crypto & Interlink Network
My journey with cryptocurrency started with very basic…
News

My Journey into Crypto & Interlink Network My journey with cryptocurrency started with very basic…

Medium Programming • 45m ago

Discover More Articles