Skip to main content

Posts

Join seeder - The best torrent app

I Came across a very useful site Seedr.cc which is very helpful in downloading torrent files. It is free and will always remain the same.you just have to visit the site and just create an account.It can be done with your Google account also. You will get 2GB of storage for free account and it can be increased by some simple tasks given on the website. You can also buy premium membership which come in many varieties. You can either copy the torrent link or you can upload the torrent file on your account. Then it will provide you a direct link for downloading the file. Reasons why you will have a need for Seedr: -Steady stream videos, tunes, and also guides upon any kind of system -With top-in-class streaming technologies, Seedr allows you to enjoy videos, tune in to tunes, as well as study something as part of your bit-torrent stockpile straight in the cloud upon any kind of system. -Non-public and also safe and sound. -Seedr provides high-level carry encryption to guard the privacy. -V...

zoho taxi question (3rd Round)

Taxi application Design a Call taxi booking application -There are n number of taxi’s. For simplicity, assume 4. But it should work for any number of taxi’s. -The are 6 points(A,B,C,D,E,F) -All the points are in a straight line, and each point is 15kms away from the adjacent points. -It takes 60 mins to travel from one point to another -Each taxi charges Rs.100 minimum for the first 5 kilometers and Rs.10 for the subsequent kilometers. -For simplicity, time can be entered as absolute time. Eg: 9hrs, 15hrs etc. -All taxi’s are initially stationed at A. -When a customer books a Taxi, a free taxi at that point is allocated -If no free taxi is available at that point, a free taxi at the nearest point is allocated. -If two taxi’s are free at the same point, one with lower earning is allocated -Note that the taxi only charges the customer from the pickup point to the drop point. Not the distance it travels from an adjacent point to pickup the customer. -If no taxi is free a...

Patten Printing

Construct a paztriangle up to the given N number. If the triangle is not formed then Print remaining elements  with X. N=23 X X  X 18  20  22 10  12  14 16 0  2  4  6  8 N=18 18 14 16 8 10 12 0 2 4 6 //Java Code import java.util.Scanner; public class Main { static void triangle( int n){ int total= 0 ; int _x= 0 ; int count= 0 ; for ( int i= 1 ;i<n;i++){ total+=i; if (( 2 *total)>n) break ; } String []a= new String[total]; if (n% 2 != 0 ) n-= 1 ; for ( int i= 0 ;i<total;i++){ if (count<=n) { a[i] = count+ "" ; count+= 2 ; } else a[i] = "X" ; } int right= 1 ; while (total!= 0 ){ _x+=right; count=a. length -_x; for ( int i= 1 ;i<=right;i++){ Sy...

Print the Array In Sorting Order

There Are Two Arrays in Sorted Form .Task is to Merge the Array and Print in Sorted Order Either in Incresing or Decreasing Order NOTE:Array should be in Sorted order (donot store the array and sort) //JAVA CODE import java.util.Scanner; public class Main { static int sorted( int []a, int [] b, int value){ int min= 0 ; for ( int i= 0 ;i<a. length ;i++) { if (value == 0 && min < a[i]) min = a[i]; else if (min < a[i] && value > a[i]) min = a[i]; } for ( int i= 0 ;i<b. length ;i++) { if (value== 0 && min<b[i]) min = b[i]; else if (min < b[i] && value > b[i]) min=b[i]; } return min; } public static void main(String[] args) { Scanner sc = new Scanner(System. in ); int m=sc.nextInt(); int n=sc.nextInt(); int []a= new int [m]; int []b= ne...

Inser 0 after Consecutive (K times) Of 1 is Found

Example: Input: Number of bits: 12 Bits: 1 0 1 1 0 1 1 0 1 1 1 1 Consecutive K: 2 Output: 1 0 1 1 0 0 1 1 0 0 1 1 0 1 1 0 //JAVA CODE import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc= new Scanner(System. in ); int n = sc.nextInt(); int k=sc.nextInt(); int []a = new int [n]; int temp= 0 ; //Inputs for ( int i= 0 ;i<n;i++) a[i]=sc.nextInt(); //print for ( int i= 0 ;i<n;i++){ System. out .print(a[i]+ " " ); if (a[i]== 1 ){ temp++; if (temp==k) { System. out .print( "0 " ); temp= 0 ; } } else temp= 0 ; } } }

A Simple Fraction

Given a fraction. Convert it into a decimal. So simple :P eg. 10/2 = 5 3/5 = 0.6 (The Question Begins Now)  :D If the decimals are repeating recursively, then enclose them inside  (). eg. 8/3 = 2.(6) as 8/3 = 2.66666666.......  infinitly.    Input: The first line of each test case is an integer N denoting the numerator of fraction. The second line of each test case is an integer D denoting the denominator of fraction. Output: Print decimal of that fraction in separate line for each test case. Constraints: 1 ≤ N,D ≤ 2000 Example: Input 4 2 8 3 Output 2 2.(6) //JAVA CODE import java.util.Scanner; public class Main { static String simple_fraction( int a, int b){ String s=a/b+ "" ; if (a%b== 0 ) return s; a%=b; String ad= "" ; int []n= new int [b]; int count= 0 ; while (a> 0 && n[a]== 0 ){ n[a]=++count; a*= 10 ; int temp=a/b; ...

Similar expressions

Given two expressions in the form of strings. The task is to compare them and check if they are similar. Expressions consist of lowercase alphabets, '+', '-' and  '( )'. Input: The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains two lines. And each line contains an expression. Output For each test case, print in a new line "YES"  if the expressions are similar else print "NO". Constraints: 1<=T<=100 3<=|Expression length|<=100 Example: Input: 2 -(a+b+c) -a-b-c a-b-(c-d) a-b-c-d Output: YES NO //JAVA CODE import java.util.ArrayList; import java.util.Scanner; public class Main { static boolean isequal(String s1,String s2){ return s1.equals(s2); } static char sign_change( int positive, int negative, int parentheses, char a){ if (negative > 0 && parentheses> 0 ){ if (a== '-' ) ...