Skip to content

Instantly share code, notes, and snippets.

View sharmaabhinav's full-sized avatar
😀
Working

ABHINAV SHARMA sharmaabhinav

😀
Working
  • Bangalore
View GitHub Profile
no = ARGV[0].to_i
copy_no = no
check_digit = 0
for i in 2..13
if i%2 !=0
check_digit = check_digit + (copy_no%10) * 1
else
check_digit = check_digit + (copy_no%10) * 3
@sharmaabhinav
sharmaabhinav / Robo
Last active December 26, 2015 17:29
lines = IO.readlines("input.txt")
coordinates = lines[0]
max_x,max_y = lines[0].split(" ")
i = 1
def final_coordinates(x,y,d,steps)
x = x.to_i
require 'open-uri'
require 'json'
module Github
COMMIT_TYPE_SCORE_MAPPING = {
PushEvent: 5,
PullRequestReviewCommentEvent: 4,
WatchEvent: 3,
CreateEvent: 2
require 'open-uri'
require 'json'
class Temprature
DROPBOX_FILE_URL = 'https://www.dropbox.com/s/zih6f1psx82ehe1/miami-temperature.txt?dl=1'
def initialize
get_data_from_dropbox_file
end
class PriceCalculator
attr_reader :item_quantities, :item_names
ITEM_UNIT_PRICES = {
milk: 3.97,
bread: 2.17,
banana: 0.99,
apple: 0.89
}
public class HelloWorld{
public static void main(String []args){
int p = 0;
int q = 1;
int n = 13;
int tmp = 0;
while(n > 0){
System.out.println(q);
tmp = q;
public class HelloWorld{
public static void main(String []args){
int arr[] = new int[13];
fab(13, arr);
}
// 0 means there is no substring
import java.util.Scanner;
public class HelloWorld{
public static void main(String []args){
String s1 = "dyittvbiaxyavvvyia";
String s2 = "itya";
class Solution
attr_accessor :string1, :string2, :string3
def shortest_length
char_count_arr = create_char_count_array
return 0 if string2.length > string1.length
public class Str {
public static void main (String[] args){
String p1 = " abhinav is a good";
int i=0;
int j=0;
int count = 0;
while(i < p1.length()){
if(p1.charAt(i) == '\t' || p1.charAt(i) == ' '){
i++;