MCPcopy Create free account
hub / github.com/Ayush7614/Daily-Coding-DS-ALGO-Practice / nl

Method nl

Hackerank/Java/Strong-password.java:142–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

140 }
141
142 private long nl()
143 {
144 long num = 0;
145 int b;
146 boolean minus = false;
147 while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
148 if(b == '-'){
149 minus = true;
150 b = readByte();
151 }
152
153 while(true){
154 if(b >= '0' && b <= '9'){
155 num = num * 10 + (b - '0');
156 }else{
157 return minus ? -num : num;
158 }
159 b = readByte();
160 }
161 }
162
163 private static void tr(Object... o) { System.out.println(Arrays.deepToString(o)); }
164}

Callers

nothing calls this directly

Calls 1

readByteMethod · 0.95

Tested by

no test coverage detected