SlideShare a Scribd company logo
1 of 1
Download to read offline
import java.util.Arrays;
public class LongStreak {
public static void main (String [] args) {
boolean[] test_case = {false,true,false,true,true};
int[] out = longestStreat(test_case);
for(int i=0;i
Solution
import java.util.Arrays;
public class LongStreak {
public static void main (String [] args) {
boolean[] test_case = {false,true,false,true,true};
int[] out = longestStreat(test_case);
for(int i=0;i

More Related Content

More from amaresh6333

I would say very many elements exista as monoatom.pdf
                     I would say very many elements exista as monoatom.pdf                     I would say very many elements exista as monoatom.pdf
I would say very many elements exista as monoatom.pdfamaresh6333
 
E is simply hexane...no polarity at all...nothing.pdf
                     E is simply hexane...no polarity at all...nothing.pdf                     E is simply hexane...no polarity at all...nothing.pdf
E is simply hexane...no polarity at all...nothing.pdfamaresh6333
 
Ferroxyl contains the chemical compound Potassium.pdf
                     Ferroxyl contains the chemical compound Potassium.pdf                     Ferroxyl contains the chemical compound Potassium.pdf
Ferroxyl contains the chemical compound Potassium.pdfamaresh6333
 
There are two different types of mechanisms. Ther.pdf
                     There are two different types of mechanisms. Ther.pdf                     There are two different types of mechanisms. Ther.pdf
There are two different types of mechanisms. Ther.pdfamaresh6333
 
What must be true about a set of data when its standard deviation is.pdf
What must be true about a set of data when its standard deviation is.pdfWhat must be true about a set of data when its standard deviation is.pdf
What must be true about a set of data when its standard deviation is.pdfamaresh6333
 
When one drives from sea level to trailhead in high Sierras, altitud.pdf
When one drives from sea level to trailhead in high Sierras, altitud.pdfWhen one drives from sea level to trailhead in high Sierras, altitud.pdf
When one drives from sea level to trailhead in high Sierras, altitud.pdfamaresh6333
 
the reaction as follows- 14N7 + 0n1 -- 4He2 + 1.pdf
                     the reaction as follows- 14N7 + 0n1 -- 4He2 + 1.pdf                     the reaction as follows- 14N7 + 0n1 -- 4He2 + 1.pdf
the reaction as follows- 14N7 + 0n1 -- 4He2 + 1.pdfamaresh6333
 
The important thing here is to understand the Standard Electrode Pot.pdf
The important thing here is to understand the Standard Electrode Pot.pdfThe important thing here is to understand the Standard Electrode Pot.pdf
The important thing here is to understand the Standard Electrode Pot.pdfamaresh6333
 
The pathway would be overactive.The GTPase activity of the alpha s.pdf
The pathway would be overactive.The GTPase activity of the alpha s.pdfThe pathway would be overactive.The GTPase activity of the alpha s.pdf
The pathway would be overactive.The GTPase activity of the alpha s.pdfamaresh6333
 
The metal ion is Pb2+.The white precipitate PbCl2 is insoluble in .pdf
The metal ion is Pb2+.The white precipitate PbCl2 is insoluble in .pdfThe metal ion is Pb2+.The white precipitate PbCl2 is insoluble in .pdf
The metal ion is Pb2+.The white precipitate PbCl2 is insoluble in .pdfamaresh6333
 
The electron carriers that feed into the ETC are NADH and FADH2.NA.pdf
The electron carriers that feed into the ETC are NADH and FADH2.NA.pdfThe electron carriers that feed into the ETC are NADH and FADH2.NA.pdf
The electron carriers that feed into the ETC are NADH and FADH2.NA.pdfamaresh6333
 
The developmental potential, or potency of a cell, describes the ran.pdf
The developmental potential, or potency of a cell, describes the ran.pdfThe developmental potential, or potency of a cell, describes the ran.pdf
The developmental potential, or potency of a cell, describes the ran.pdfamaresh6333
 
Tested on linux,ubuntu#include stdlib.h #include systypes..pdf
Tested on linux,ubuntu#include stdlib.h #include systypes..pdfTested on linux,ubuntu#include stdlib.h #include systypes..pdf
Tested on linux,ubuntu#include stdlib.h #include systypes..pdfamaresh6333
 
Since HEPES is a zwitterionic organic chemical buffering agent.At .pdf
Since HEPES is a zwitterionic organic chemical buffering agent.At .pdfSince HEPES is a zwitterionic organic chemical buffering agent.At .pdf
Since HEPES is a zwitterionic organic chemical buffering agent.At .pdfamaresh6333
 
public static class LinkedDequeT implements DequeADTT{    priv.pdf
public static class LinkedDequeT implements DequeADTT{    priv.pdfpublic static class LinkedDequeT implements DequeADTT{    priv.pdf
public static class LinkedDequeT implements DequeADTT{    priv.pdfamaresh6333
 
No matter. you can write either the H (on the C with the Br) and Cl .pdf
No matter. you can write either the H (on the C with the Br) and Cl .pdfNo matter. you can write either the H (on the C with the Br) and Cl .pdf
No matter. you can write either the H (on the C with the Br) and Cl .pdfamaresh6333
 
Moles of N2O5 = number of moleculesAvogadros number= 4.04 x 1020.pdf
Moles of N2O5 = number of moleculesAvogadros number= 4.04 x 1020.pdfMoles of N2O5 = number of moleculesAvogadros number= 4.04 x 1020.pdf
Moles of N2O5 = number of moleculesAvogadros number= 4.04 x 1020.pdfamaresh6333
 
LOOPSFor LoopFor loop executes group of Java statements as long.pdf
LOOPSFor LoopFor loop executes group of Java statements as long.pdfLOOPSFor LoopFor loop executes group of Java statements as long.pdf
LOOPSFor LoopFor loop executes group of Java statements as long.pdfamaresh6333
 
Intermediate levels of disturbance often lead to higher diversity be.pdf
Intermediate levels of disturbance often lead to higher diversity be.pdfIntermediate levels of disturbance often lead to higher diversity be.pdf
Intermediate levels of disturbance often lead to higher diversity be.pdfamaresh6333
 
In the life cycle of a sexually reproducing organism, regulation of .pdf
In the life cycle of a sexually reproducing organism, regulation of .pdfIn the life cycle of a sexually reproducing organism, regulation of .pdf
In the life cycle of a sexually reproducing organism, regulation of .pdfamaresh6333
 

More from amaresh6333 (20)

I would say very many elements exista as monoatom.pdf
                     I would say very many elements exista as monoatom.pdf                     I would say very many elements exista as monoatom.pdf
I would say very many elements exista as monoatom.pdf
 
E is simply hexane...no polarity at all...nothing.pdf
                     E is simply hexane...no polarity at all...nothing.pdf                     E is simply hexane...no polarity at all...nothing.pdf
E is simply hexane...no polarity at all...nothing.pdf
 
Ferroxyl contains the chemical compound Potassium.pdf
                     Ferroxyl contains the chemical compound Potassium.pdf                     Ferroxyl contains the chemical compound Potassium.pdf
Ferroxyl contains the chemical compound Potassium.pdf
 
There are two different types of mechanisms. Ther.pdf
                     There are two different types of mechanisms. Ther.pdf                     There are two different types of mechanisms. Ther.pdf
There are two different types of mechanisms. Ther.pdf
 
What must be true about a set of data when its standard deviation is.pdf
What must be true about a set of data when its standard deviation is.pdfWhat must be true about a set of data when its standard deviation is.pdf
What must be true about a set of data when its standard deviation is.pdf
 
When one drives from sea level to trailhead in high Sierras, altitud.pdf
When one drives from sea level to trailhead in high Sierras, altitud.pdfWhen one drives from sea level to trailhead in high Sierras, altitud.pdf
When one drives from sea level to trailhead in high Sierras, altitud.pdf
 
the reaction as follows- 14N7 + 0n1 -- 4He2 + 1.pdf
                     the reaction as follows- 14N7 + 0n1 -- 4He2 + 1.pdf                     the reaction as follows- 14N7 + 0n1 -- 4He2 + 1.pdf
the reaction as follows- 14N7 + 0n1 -- 4He2 + 1.pdf
 
The important thing here is to understand the Standard Electrode Pot.pdf
The important thing here is to understand the Standard Electrode Pot.pdfThe important thing here is to understand the Standard Electrode Pot.pdf
The important thing here is to understand the Standard Electrode Pot.pdf
 
The pathway would be overactive.The GTPase activity of the alpha s.pdf
The pathway would be overactive.The GTPase activity of the alpha s.pdfThe pathway would be overactive.The GTPase activity of the alpha s.pdf
The pathway would be overactive.The GTPase activity of the alpha s.pdf
 
The metal ion is Pb2+.The white precipitate PbCl2 is insoluble in .pdf
The metal ion is Pb2+.The white precipitate PbCl2 is insoluble in .pdfThe metal ion is Pb2+.The white precipitate PbCl2 is insoluble in .pdf
The metal ion is Pb2+.The white precipitate PbCl2 is insoluble in .pdf
 
The electron carriers that feed into the ETC are NADH and FADH2.NA.pdf
The electron carriers that feed into the ETC are NADH and FADH2.NA.pdfThe electron carriers that feed into the ETC are NADH and FADH2.NA.pdf
The electron carriers that feed into the ETC are NADH and FADH2.NA.pdf
 
The developmental potential, or potency of a cell, describes the ran.pdf
The developmental potential, or potency of a cell, describes the ran.pdfThe developmental potential, or potency of a cell, describes the ran.pdf
The developmental potential, or potency of a cell, describes the ran.pdf
 
Tested on linux,ubuntu#include stdlib.h #include systypes..pdf
Tested on linux,ubuntu#include stdlib.h #include systypes..pdfTested on linux,ubuntu#include stdlib.h #include systypes..pdf
Tested on linux,ubuntu#include stdlib.h #include systypes..pdf
 
Since HEPES is a zwitterionic organic chemical buffering agent.At .pdf
Since HEPES is a zwitterionic organic chemical buffering agent.At .pdfSince HEPES is a zwitterionic organic chemical buffering agent.At .pdf
Since HEPES is a zwitterionic organic chemical buffering agent.At .pdf
 
public static class LinkedDequeT implements DequeADTT{    priv.pdf
public static class LinkedDequeT implements DequeADTT{    priv.pdfpublic static class LinkedDequeT implements DequeADTT{    priv.pdf
public static class LinkedDequeT implements DequeADTT{    priv.pdf
 
No matter. you can write either the H (on the C with the Br) and Cl .pdf
No matter. you can write either the H (on the C with the Br) and Cl .pdfNo matter. you can write either the H (on the C with the Br) and Cl .pdf
No matter. you can write either the H (on the C with the Br) and Cl .pdf
 
Moles of N2O5 = number of moleculesAvogadros number= 4.04 x 1020.pdf
Moles of N2O5 = number of moleculesAvogadros number= 4.04 x 1020.pdfMoles of N2O5 = number of moleculesAvogadros number= 4.04 x 1020.pdf
Moles of N2O5 = number of moleculesAvogadros number= 4.04 x 1020.pdf
 
LOOPSFor LoopFor loop executes group of Java statements as long.pdf
LOOPSFor LoopFor loop executes group of Java statements as long.pdfLOOPSFor LoopFor loop executes group of Java statements as long.pdf
LOOPSFor LoopFor loop executes group of Java statements as long.pdf
 
Intermediate levels of disturbance often lead to higher diversity be.pdf
Intermediate levels of disturbance often lead to higher diversity be.pdfIntermediate levels of disturbance often lead to higher diversity be.pdf
Intermediate levels of disturbance often lead to higher diversity be.pdf
 
In the life cycle of a sexually reproducing organism, regulation of .pdf
In the life cycle of a sexually reproducing organism, regulation of .pdfIn the life cycle of a sexually reproducing organism, regulation of .pdf
In the life cycle of a sexually reproducing organism, regulation of .pdf
 

Recently uploaded

When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFVivekanand Anglo Vedic Academy
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhleson0603
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptxPoojaSen20
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptNishitharanjan Rout
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesPooky Knightsmith
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文中 央社
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
 

Recently uploaded (20)

VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 

import java.util.Arrays; public class LongStreak { public static.pdf

  • 1. import java.util.Arrays; public class LongStreak { public static void main (String [] args) { boolean[] test_case = {false,true,false,true,true}; int[] out = longestStreat(test_case); for(int i=0;i Solution import java.util.Arrays; public class LongStreak { public static void main (String [] args) { boolean[] test_case = {false,true,false,true,true}; int[] out = longestStreat(test_case); for(int i=0;i