Skip to content

Instantly share code, notes, and snippets.

View c4elme's full-sized avatar
🎯
Focusing

C4EL c4elme

🎯
Focusing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am anotsodev on github.
  • I am kdh_me (https://keybase.io/kdh_me) on keybase.
  • I have a public key ASDEBnHp0-YmUxwTR9IsBHOqSED-ygzHepT_AWHFycNFOgo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am anotsodev on github.
  • I am anotsodev (https://keybase.io/anotsodev) on keybase.
  • I have a public key ASBWZ18XjzZmcvjWg5R_1P13avgFkXiK4UV2cHPvbajYOgo

To claim this, I am signing this object:

# you can write to stdout for debugging purposes, e.g.
# print("this is a debug message")
def solution(A, K):
# write your code in Python 3.6
new_list = A.copy()
# remain = len(A)-K
res = 0
for i in range(K):
for i in range(len(A)):
def solution(X, Y, D):
# write your code in Python 3.6
init_count = ((Y-X)//D)
total_d = 0
while True:
total_d = D*init_count
if (total_d+X) >= Y:
break
init_count += 1
return init_count
def solution(A):
# write your code in Python 3.6
limit = len(A)
arr = sorted(A)
sec_index = 1
return_val = 0
for i in arr:
if limit == 1 and arr[0] == 1:
return 1
if limit >= 2 and arr[0] > 1:

Keybase proof

I hereby claim:

  • I am anotsodev on github.
  • I am kylehalog (https://keybase.io/kylehalog) on keybase.
  • I have a public key ASBGqk7DOWMGxbFeOAtrwgg_oHEeEIp2Pv6CpV0g0f3bEgo

To claim this, I am signing this object:

@c4elme
c4elme / binary_gap.rb
Last active July 26, 2016 01:07
Solution on BinaryGap lesson
# you can write to stdout for debugging purposes, e.g.
# puts "this is a debug message"
def solution(n)
# write your code in Ruby 2.2
longest = 0
bin_array = []
num_to_str=n.to_s(2)
bin_array=num_to_str.split("1")