Skip to content

Instantly share code, notes, and snippets.

@yaraxxx
yaraxxx / deliveryService.in
Last active Feb 26, 2020
delivery Service
View deliveryService.in
2
3
10
20
30
2
50
100
@yaraxxx
yaraxxx / commaSaperatedValues.in
Last active Feb 26, 2020
Comma Saperated Values
View commaSaperatedValues.in
2
some#important#data
gulf$open|programming%contest
View MinimumCostToConnectAllCities.py
# 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 Feb 2, 2020
Data Structure 01 : Operations on arrays
View operationsOnArrays.cpp
//
// main.cpp
// dataStructures01
//
#include <iostream>
int const SIZE =6;
int A[SIZE] = {1,2,2,4,5} , N = 5; // what is N??
View PalindromeBase.java
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);