SlideShare a Scribd company logo
1 of 1
Download to read offline
Given an array of ints, return true if the number of 1's is
greater than the number of 8's.
moreOneEight([1, 8, 1]) true
moreOneEight([1, 8, 1, 8]) false
moreOneEight([1, 1]) trueExample input and output
InputOutputint[] nums = {8, 1, 1, 8, 1, 8, 8, 8, 8, 8};
System.out.println(moreOneEight(nums));false

More Related Content

More from fmac5

hello with only using the properties from the right hand side can yo.pdf
hello with only using the properties from the right hand side can yo.pdfhello with only using the properties from the right hand side can yo.pdf
hello with only using the properties from the right hand side can yo.pdffmac5
 
Hello please help me how to do this project in C and explain to me h.pdf
Hello please help me how to do this project in C and explain to me h.pdfHello please help me how to do this project in C and explain to me h.pdf
Hello please help me how to do this project in C and explain to me h.pdffmac5
 
Greenwich Industries entered the Latin American market in the 1950s .pdf
Greenwich Industries entered the Latin American market in the 1950s .pdfGreenwich Industries entered the Latin American market in the 1950s .pdf
Greenwich Industries entered the Latin American market in the 1950s .pdffmac5
 
Gordon and Colleen Howe� Mini CaseToday is January 1, 2023.pdf
Gordon and Colleen Howe� Mini CaseToday is January 1, 2023.pdfGordon and Colleen Howe� Mini CaseToday is January 1, 2023.pdf
Gordon and Colleen Howe� Mini CaseToday is January 1, 2023.pdffmac5
 
Go to Previous section To Partner or Not to Partner with a Retail Co.pdf
Go to Previous section To Partner or Not to Partner with a Retail Co.pdfGo to Previous section To Partner or Not to Partner with a Retail Co.pdf
Go to Previous section To Partner or Not to Partner with a Retail Co.pdffmac5
 
Given the following list of accounts with normal balance, prepare a .pdf
Given the following list of accounts with normal balance, prepare a .pdfGiven the following list of accounts with normal balance, prepare a .pdf
Given the following list of accounts with normal balance, prepare a .pdffmac5
 
Given the following challenges, use append(), extend(), pop(), and i.pdf
Given the following challenges, use append(), extend(), pop(), and i.pdfGiven the following challenges, use append(), extend(), pop(), and i.pdf
Given the following challenges, use append(), extend(), pop(), and i.pdffmac5
 
Given Microsoft�s lackluster performance since 2000, the once domina.pdf
Given Microsoft�s lackluster performance since 2000, the once domina.pdfGiven Microsoft�s lackluster performance since 2000, the once domina.pdf
Given Microsoft�s lackluster performance since 2000, the once domina.pdffmac5
 
give me an example of 6. Additional Plans Specify or re.pdf
give me an example of 6. Additional Plans Specify or re.pdfgive me an example of 6. Additional Plans Specify or re.pdf
give me an example of 6. Additional Plans Specify or re.pdffmac5
 
Give me a substantive comment on this postThe way an organization.pdf
Give me a substantive comment on this postThe way an organization.pdfGive me a substantive comment on this postThe way an organization.pdf
Give me a substantive comment on this postThe way an organization.pdffmac5
 
Give an extensive background of Pick n Pay. This should include info.pdf
Give an extensive background of Pick n Pay. This should include info.pdfGive an extensive background of Pick n Pay. This should include info.pdf
Give an extensive background of Pick n Pay. This should include info.pdffmac5
 
Geoffrey This is very helpful, but I need your guidance to s.pdf
Geoffrey This is very helpful, but I need your guidance to s.pdfGeoffrey This is very helpful, but I need your guidance to s.pdf
Geoffrey This is very helpful, but I need your guidance to s.pdffmac5
 
For part B use BFS and with another loop. There is a group of p Ava .pdf
For part B use BFS and with another loop. There is a group of p Ava .pdfFor part B use BFS and with another loop. There is a group of p Ava .pdf
For part B use BFS and with another loop. There is a group of p Ava .pdffmac5
 

More from fmac5 (13)

hello with only using the properties from the right hand side can yo.pdf
hello with only using the properties from the right hand side can yo.pdfhello with only using the properties from the right hand side can yo.pdf
hello with only using the properties from the right hand side can yo.pdf
 
Hello please help me how to do this project in C and explain to me h.pdf
Hello please help me how to do this project in C and explain to me h.pdfHello please help me how to do this project in C and explain to me h.pdf
Hello please help me how to do this project in C and explain to me h.pdf
 
Greenwich Industries entered the Latin American market in the 1950s .pdf
Greenwich Industries entered the Latin American market in the 1950s .pdfGreenwich Industries entered the Latin American market in the 1950s .pdf
Greenwich Industries entered the Latin American market in the 1950s .pdf
 
Gordon and Colleen Howe� Mini CaseToday is January 1, 2023.pdf
Gordon and Colleen Howe� Mini CaseToday is January 1, 2023.pdfGordon and Colleen Howe� Mini CaseToday is January 1, 2023.pdf
Gordon and Colleen Howe� Mini CaseToday is January 1, 2023.pdf
 
Go to Previous section To Partner or Not to Partner with a Retail Co.pdf
Go to Previous section To Partner or Not to Partner with a Retail Co.pdfGo to Previous section To Partner or Not to Partner with a Retail Co.pdf
Go to Previous section To Partner or Not to Partner with a Retail Co.pdf
 
Given the following list of accounts with normal balance, prepare a .pdf
Given the following list of accounts with normal balance, prepare a .pdfGiven the following list of accounts with normal balance, prepare a .pdf
Given the following list of accounts with normal balance, prepare a .pdf
 
Given the following challenges, use append(), extend(), pop(), and i.pdf
Given the following challenges, use append(), extend(), pop(), and i.pdfGiven the following challenges, use append(), extend(), pop(), and i.pdf
Given the following challenges, use append(), extend(), pop(), and i.pdf
 
Given Microsoft�s lackluster performance since 2000, the once domina.pdf
Given Microsoft�s lackluster performance since 2000, the once domina.pdfGiven Microsoft�s lackluster performance since 2000, the once domina.pdf
Given Microsoft�s lackluster performance since 2000, the once domina.pdf
 
give me an example of 6. Additional Plans Specify or re.pdf
give me an example of 6. Additional Plans Specify or re.pdfgive me an example of 6. Additional Plans Specify or re.pdf
give me an example of 6. Additional Plans Specify or re.pdf
 
Give me a substantive comment on this postThe way an organization.pdf
Give me a substantive comment on this postThe way an organization.pdfGive me a substantive comment on this postThe way an organization.pdf
Give me a substantive comment on this postThe way an organization.pdf
 
Give an extensive background of Pick n Pay. This should include info.pdf
Give an extensive background of Pick n Pay. This should include info.pdfGive an extensive background of Pick n Pay. This should include info.pdf
Give an extensive background of Pick n Pay. This should include info.pdf
 
Geoffrey This is very helpful, but I need your guidance to s.pdf
Geoffrey This is very helpful, but I need your guidance to s.pdfGeoffrey This is very helpful, but I need your guidance to s.pdf
Geoffrey This is very helpful, but I need your guidance to s.pdf
 
For part B use BFS and with another loop. There is a group of p Ava .pdf
For part B use BFS and with another loop. There is a group of p Ava .pdfFor part B use BFS and with another loop. There is a group of p Ava .pdf
For part B use BFS and with another loop. There is a group of p Ava .pdf
 

Recently uploaded

ĐỀ 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
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024Borja Sotomayor
 
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING IIII BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING IIagpharmacy11
 
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
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxMohamed Rizk Khodair
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
 Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatmentsaipooja36
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptxVishal Singh
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
Benefits and Challenges of OER by Shweta Babel.pptx
Benefits and Challenges of OER by Shweta Babel.pptxBenefits and Challenges of OER by Shweta Babel.pptx
Benefits and Challenges of OER by Shweta Babel.pptxsbabel
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
How to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 InventoryHow to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 InventoryCeline George
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45MysoreMuleSoftMeetup
 
Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17Celine George
 
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Denish Jangid
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppCeline George
 

Recently uploaded (20)

ĐỀ 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...
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING IIII BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
 
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
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
 Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Benefits and Challenges of OER by Shweta Babel.pptx
Benefits and Challenges of OER by Shweta Babel.pptxBenefits and Challenges of OER by Shweta Babel.pptx
Benefits and Challenges of OER by Shweta Babel.pptx
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.
 
How to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 InventoryHow to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 Inventory
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
 
Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17
 
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 

Given an array of ints, return true if the number of 1s is greate.pdf

  • 1. Given an array of ints, return true if the number of 1's is greater than the number of 8's. moreOneEight([1, 8, 1]) true moreOneEight([1, 8, 1, 8]) false moreOneEight([1, 1]) trueExample input and output InputOutputint[] nums = {8, 1, 1, 8, 1, 8, 8, 8, 8, 8}; System.out.println(moreOneEight(nums));false