잇썹 테스트 결과 맥은 외장 그래픽 써도 동영상 편집에는 별루인 것으로...

 

 

 

제가 중매쟁이는 아니지만 혹, 어려운 문제가 있다면, 늘 함께 문제를 푸는 것을 좋아하시는 분들이라 함께 뵈어도 좋고

제가 연결만 시켜드려도 좋습니다. 국내에서 운영체제를 만든 분은 몇 분 안되는데 그제도 뵈었습니다.

저는 기술을 좋아하는 사람인데 그러다보니 네트워크가 많아지게 되었고 나이가 드니 그 네트워크 만으로도 많은

문제를 풀 수 있음을 알게 되었습니다.

 

저는 ETRI에서는 대학생/대학원생 대상으로 1달 이상씩 펌웨어 단부터 프레임웍, 어플, 프로토콜, 머신러닝 관련하여

4년 전부터 강의를 했고 이번에도 강의 요청이 있어 강의를 할 것 같습니다.  도메인이 넓은 이유는 저는 일이관지의

프로토콜을 지양합니다. 쉽게 이야기를 하지만 쉽게 알아 들어서 기술을 우습게 보는 사람과는 상종하지 않습니다.

저 역시 쉽게 설명은 해도 우습게 보지 않기에 어려운 코딩을 계속 함께 합니다. 새로운 플랫폼도 계속 해 보려 합니다.

https://www.edaily.co.kr/news/read?newsId=02601046619435896&mediaCodeNo=257

이 외에도 ETRI  1위는 아니지만 다른 대회도 세계 대회 수상 기사가 있습니다.

https://itec.etri.re.kr/itec/sub02/sub02_01_1.do?t_id=1140-2019-00142

ETRI에서는 텐서 플로우 나왔을 때 따로 플랫폼도 만들고 있어서 전문가가 많이 있습니다.

3년간 한달 이상씩 강의를 하기도 했지만, 제가 가르친 학생들이 에트리 머신러닝 대회에서 수상한 점은 늘 자랑거리입니다.

물론, 제 강의의 장점은 코딩을 같이 합니다.  그러나 강의에서 가장 뛰어난 스킬은 커뮤니케이션 능력 입니다.

모르면 모른다고 하고 가르쳐 준 것도 다음 날 기억 안나면 학생들에게 물어 보고 학생들에게도 그렇게 가르칩니다.

 

binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of N.

For example, number 9 has binary representation 1001 and contains a binary gap of length 2. The number 529 has binary representation 1000010001 and contains two binary gaps: one of length 4 and one of length 3. The number 20 has binary representation 10100 and contains one binary gap of length 1. The number 15 has binary representation 1111 and has no binary gaps.

Write a function:

class Solution { public int solution(int N); }

that, given a positive integer N, returns the length of its longest binary gap. The function should return 0 if N doesn't contain a binary gap.

For example, given N = 1041 the function should return 5, because N has binary representation 10000010001 and so its longest binary gap is of length 5.

Assume that:

  • N is an integer within the range [1..2,147,483,647].

Complexity:

  • expected worst-case time complexity is O(log(N));
  • expected worst-case space complexity is O(1).

Copyright 2009–2016 by Codility Limited. All Rights Reserved. Unauthorized copying, publication or disclosure prohibited.

 

package codility;

 

class Solution1_BinaryGap {

static int solution(int N) {

// write your code in Java SE 8

int rtn = 0, cnt = 0;

boolean flag = false;

 

while (N > 1) {

N /= 2;

if (cnt > rtn && flag) {

rtn = cnt;

flag = false;

}

if (N % 2 == 0 && flag) {

cnt += 1;

continue;

} else if( N % 2 == 1) {

flag = true;

cnt = 0;

}

}

return rtn;

}

 

public static void main(String[] args) {

System.out.println(solution(9));

}

}

'Blog History' 카테고리의 다른 글

171  (0) 2020.04.14
170  (0) 2020.04.14
168  (0) 2020.04.14
167  (0) 2020.04.13
166  (0) 2020.04.12

+ Recent posts