-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFppSolution.java
190 lines (144 loc) · 5.2 KB
/
FppSolution.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
package com.fpp.solutions;
public class FppSolution {
public static void main(String[] args) {
//Millage Implementation
/* Millage millage = new Millage();
int [] miles = {9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
millage.updateMillage(miles,13);
*/
//Hallow Implementation
/* Hallow hallow = new Hallow();
int [] nums = {0,0,0};
System.out.println(hallow.isHallow(nums));*/
//Consecutive factors
/* ConsectiveFactored consectiveFactored = new ConsectiveFactored();
System.out.println(consectiveFactored.isConsectiveFactored(-12));*/
//Perfect Square
/* PerfectSquare perfectSquare = new PerfectSquare();
System.out.println(perfectSquare.isPerfectSquare(0));*/
//Is upcount
/*int[] nums = {1,2,-1,5,3,2,-3};
UpCount upCount = new UpCount();
System.out.println(upCount.isUpCount(nums,20));*/
//Prime COunt
// PrimeCount primeCount = new PrimeCount();
// System.out.println(primeCount.PrimeCount(-10,6
//
// ));
//Mahdav
// int[] nums = {2,1,1,4,-1,-1};
// Mahdav mahdav = new Mahdav();
// mahdav.isMadhavArray(nums);
//Inertial
/* int[] nums = {2, 4, 6, 8, 10 };
Inertial inertial = new Inertial();
System.out.println(inertial.isInertial(nums));*/
//Count Perfect Square
// int[] nums = {11, 5, 4, 20 };
// int[] nums = {9, 0, 2, -5, 7};
/*int[] nums = {9};
CountSquare countSquare = new CountSquare();
System.out.println(countSquare.CountSquarePairs(nums));*/
//PorcupineNumber
// int a = 139;
// PorcupineNumber porcupineNumber = new PorcupineNumber();
// System.out.println(porcupineNumber.findPorcupineNumber(a));
//Gurithe Sequence
// int[] nums = {8, 4, 2, 1};
// int[] nums = {8, 17, 4, 1};
// int[] nums = {8, 4, 1};
// int[] nums = {8, 4, 2};
// Guthrie guthrie = new Guthrie();
// System.out.println(guthrie.isGuthrieSequence(nums));
//Stanton Measure
// int a[] = {1};
// int a[] = {0};
// int a[] = {3, 1, 1, 4};
// int a[] = {1, 3, 1, 1, 3, 3, 2, 3, 3, 3, 4};
/*int a[] = {};
Stanton stanton = new Stanton();
System.out.println(stanton.stantonMeasure(a));*/
//Sum Factor
// int a[] = {1};
// int a[] ={3, 0, 2, -5, 0};
// int a [] = {9, -3, -3, -1, -1};
// SumFactor sumFactor = new SumFactor();
// System.out.println(sumFactor.sumFactor(a));
//Gurithe Index
// int a = 1;
// int a = 2;
// int a = 3;
// int a = 4;
// int a = 42;
// GuthrieIndex guthrieIndex = new GuthrieIndex();
// System.out.println(guthrieIndex.guthrieIndex(a));
//Solve 10
// Solve10 solve10 = new Solve10();
// System.out.println(solve10.solve10()[0] + " : " + solve10.solve10()[1]);
//RepsEwqual
// int a[] = {3, 2, 0, 5, 3};
// int n = 32053;
// int a[] = {3, 2, 0, 5};
// int n = 32053;
// int a[] = {3, 2, 0, 5, 3,4};
// int n = 32053;
// int a[] = {2, 3, 0, 5, 34};
// int n = 32053;
// int a[] = {0,3, 2, 0, 5, 3};
// int n = 32053;
// RepsEqual repsEqual = new RepsEqual();
// System.out.println(repsEqual.repsEqual(a, n));
//Centered 15
//int a[] = {3, 2, 10, 4, 1, 6, 9};
// int a[] = {2, 10, 4, 1, 6, 9};
// int a[] ={1,1,8, 3, 1, 1};
// Centered15 centered15 = new Centered15();
// System.out.println(centered15.isCentered15(a));
//Henry
// PefectNumber pefectNumber = new PefectNumber();
// System.out.println(pefectNumber.henry(1,3));
//NUpCount
// int a[] ={2,3,1,-6,8,-3,-1,2};
// int n = 5;
// int a[] ={6,3,1};
// int n = 6;
// int a[] ={1,2,-1,5,3,2,-3};
// int n = 20;
// NUpCount nUpCount = new NUpCount();
// System.out.println(nUpCount.nUpCount(a,n));
//NUnique
// int [] a= {2, 7, 3, 4};
// int a[] = {2, 3, 3, 7} ;
// int n = 5;
// int a [] = {1};
// int n = 11;
// NUnique nUnique = new NUnique();
// System.out.println(nUnique.isNUnique(a,n));
//IsSqaure
// int n = -4;
// IsSquare isSquare = new IsSquare();
// System.out.println(isSquare.isSquare(n));
//Legal Number
// int a[] = {3, 2, 1};
// int n = 4;
// LegalNumber legalNumber = new LegalNumber();
// System.out.println(legalNumber.isLegalNumber(a,n));
//Convert to base 10
// int a[] = {1, 0, 1, 1};
// int base = 2;
// int a[] = {1, 1, 2};
// int base = 3;
// int a[] = {3, 2, 5};
// int base = 8;
// int a[] = {3, 7, 1};
// int base = 6;
//
// ConvertToBase10 convertToBase10 = new ConvertToBase10();
// System.out.println(convertToBase10.convertToBase10(a, base));
//has No Zeroes
// int[] n = {1, 2, 3};
int[] n = {1, 0,4,0};
HasZeros hasZeros = new HasZeros();
System.out.println(hasZeros.arrayHasNoZeroes(n));
}
}