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
- hackerrank
- 알고리즘
- spring boot application
- java
- ... in Javascript
- Object type casting
- equals()
- javascript
- easy javascript algorithm
- Collection Framework
- compareTo()
- easy algorithm
- hackerrank solution
- rest parameter
- HashMap
- 프로그래머스
- repeat()
- math.max
- string class in java
- C++
- 프로그래머스 알고리즘
- substring()
- code refactoring
- hackerrank javascript
- 프로그래머스 알고리즘문제
- HackerRank Algorithm
- algorithm
- Javascript Algorithm
- math.abs
- hackerrank javascript solution
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |
글 보관함