Skip to content

Instantly share code, notes, and snippets.

@yaraxxx
yaraxxx / deliveryService.in
Last active February 26, 2020 16:51
delivery Service
2
3
10
20
30
2
50
100
@yaraxxx
yaraxxx / theRotatingDigits.in
Created February 26, 2020 16:50
The Rotating Digits
2
123 1
489 2
@yaraxxx
yaraxxx / commaSaperatedValues.in
Last active February 26, 2020 16:49
Comma Saperated Values
2
some#important#data
gulf$open|programming%contest
# Python3 code to find out minimum cost
# path to connect all the cities
# Algorithm explanation https://www.geeksforgeeks.org/minimum-cost-connect-cities/
import sys
def minKey(n,list,nodes):
min = sys.maxsize
for i in range(n):
if(list[i] < min and nodes[i] == False):
min = list[i]
@yaraxxx
yaraxxx / operationsOnArrays.cpp
Created February 2, 2020 18:12
Data Structure 01 : Operations on arrays
//
// main.cpp
// dataStructures01
//
#include <iostream>
int const SIZE =6;
int A[SIZE] = {1,2,2,4,5} , N = 5; // what is N??
@yaraxxx
yaraxxx / PalindromeBase.java
Created February 2, 2020 06:30
PalindromeBase
import java.io.*;
public class PalindromeBase {
static String number = "";// this string is to store the reminder untill num/base == 0
// I used recursive function
public static int calculate(int num , int base){
if(num/base==0){
number += Integer.toString(num%base);
return 0;
}else{
number += Integer.toString(num%base);