Calculate the Max minus Min Value in Array
1. Initialize random index for minimum and maximum value. Anyhow it's gonna be updated. 2. To find the max and min element in an array, use Max and Min function. Example Code in Java public class Main{ public static void main(String args[]) { int arr[] = {2,4,3,7,5}; System.out.println(getMinMax(arr)); } public static int getMinMax(int[] arr) { //just set arbitrary index 0,1 for now int min = ar..
Algorithms
2019. 9. 8. 14:43
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- spring boot application
- easy algorithm
- C++
- substring()
- 프로그래머스 알고리즘문제
- javascript
- HashMap
- hackerrank
- hackerrank solution
- code refactoring
- rest parameter
- math.abs
- HackerRank Algorithm
- algorithm
- hackerrank javascript
- equals()
- Javascript Algorithm
- 알고리즘
- compareTo()
- repeat()
- Object type casting
- 프로그래머스 알고리즘
- java
- 프로그래머스
- math.max
- hackerrank javascript solution
- Collection Framework
- easy javascript algorithm
- string class in java
- ... in Javascript
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 26 | 27 | 28 |
글 보관함