Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1023863 // minOfIntArray

JavaX fragment (include)

1  
static int minOfIntArray(int[] a) {
2  
  if (a == null || a.length == 0) ret 0;
3  
  int n = a.length, x = a[0];
4  
  for (int i = 1; i < n; i++)
5  
    x = min(a[i], x);
6  
  ret x;
7  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1023863
Snippet name: minOfIntArray
Eternal ID of this version: #1023863/2
Text MD5: 04c6bb64fd2e447281ed2070954cb944
Author: stefan
Category: javax / maths
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-10 18:34:54
Source code size: 175 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 228 / 268
Version history: 1 change(s)
Referenced in: [show references]