[Basic] Total count

Given an array and a threshold value k where k is used to divide each element of the array. Find the total number of divisions we get after dividing each element of the array by k.
for example:
A[ ] = 5 8 10 13 6 2 and k is 3
Output will be 17

More …

[Basic] Searching a number

Given an array of N elements and a integer K , return the position of first occurence of K in given array. Position of first element is considered as 1.
Output -1 if the number is not found in an array.

More …

[Basic] Row with minimum number of 1's

Determine the row index with minimum number of ones. The given 2D matrix has only zeroes and ones and also the matrix is sorted row wise . If two or more rows have same number of 1’s than print the row with smallest index.

More …

2018-02-19 현재 내 머리속은

오늘 독일 연방고용청 소속 ZAV(해외전문인력 중재센터)에서 연락이 왔다. 차세대 CoolMOS high-volate power MOSFET을 개발하는 연구직에서 일해볼 생각이 있냐는 메일이다. 올해 4월 부터 일할 수 있어야하고 지역은 Dresden.. 내가 공부했던 분야와 완전히 일치하고 게다가 정규직이다. 작년의 나였으면 뒤도 안돌아보고 갔을 조건이다.

More …

[Basic] Chocolate Distribution Problem

Given an array A[] of N integers where each value represents number of chocolates in a packet. Each packet can have variable number of chocolates. There are m students, the task is to distribute chocolate packets such that :

  1. Each student gets one packet.
  2. The difference between the number of chocolates given to the students in packet with maximum chocolates and packet with minimum chocolates is minimum.
More …