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

7
LINES

< > BotCompany Repo | #1033055 // doublesAreSorted

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3860L/22K).

1  
sbool doublesAreSorted(double[] l) {
2  
  int n = l(l);
3  
  for (int i = 0; i < n-1; i++)
4  
    if (l[i] > l[i+1])
5  
      false;
6  
  true;
7  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033055
Snippet name: doublesAreSorted
Eternal ID of this version: #1033055/1
Text MD5: e379bf7cfc92eb62286af8998e30e8a8
Transpilation MD5: 796cc6bfdcda3e5e1fd3cae4f63e3e09
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-11 19:32:39
Source code size: 136 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 151 / 222
Referenced in: [show references]