id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

orion.a.smith@gmail.com apcsa-lists

Description:problems using ArrayLists in Java

These problems all use the ArrayList class, with generic typing through the angle bracket convention such as ArrayList<Integer>.`


Note about CodingBat test cases with ArrayLists

CodingBat will represent ArrayLists in test cases much like arrays, using the square bracket [] syntax. This can sometimes be confusing, since some of the problems in this set use both arrays and ArrayLists. Look to the method header to give you more information about what data structures the input and output represent.


null values in ArrayLists

Yes, ArrayList structures can contain null values. There are a few problems that explicitly call this out and they will have specific text about it. On the AP exam FRQs, nulls are only something you have to worry about if you are explicitly warned and if null plays a role in the meaning of the problem.


No loops

apcsaListCreateFromParams 
apcsaListCreateReversed 
apcsaListSize 
apcsaListAddEnd 
apcsaListAddBeginning 
apcsaListReplaceThird 
apcsaListRemoveSomewhere 
apcsaListAddSize 
apcsaListAddRepeat 
apcsaListReplaceSomewhere 
apcsaListSetRotation 
apcsaListInsertThrice 
apcsaListRemoveFirstMatch 
apcsaListFromArray 
apcsaListToArray 
apcsaListAverageRemovals 


With loops

apcsaListAllInBetweens 
apcsaListReplaceZeros 
apcsaListAddLargestValue 
apcsaListAddLargestIndex 
apcsaListNoNulls 
apcsaListRemoveBetween 
apcsaListHalfBeforeZeros 
apcsaListFindClosest 
apcsaListBackwardsEvens 
apcsaListRemoveCloseUnder 
apcsaListRemoveOdds 
apcsaListPricedRight 
apcsaListAddNegations 


From other teachers

From Lauren Tan, APCS Teacher at Ridge High School in Basking Ridge, NJ

removeLowerVals H   findAverage H   lotteryTicketChecker H   lotteryTicketCheckerWithRepeats H  


With String elements

apcsaListFirstCharacters  apcsaListEvenStrings  apcsaListAverageLength  apcsaListIncreasingLength  apcsaListAddSplice  apcsaListFindTarget  apcsaListIncreasingStrings  apcsaListOrderedCharacters  apcsaListJustCharacters  apcsaListLongestPrefix  apcsaListOthersContained  apcsaListModMover 


Harder problems

Enjoy!

apcsaListCompletePairs  apcsaListElementsToIndexes  apcsaListFrequencies  apcsaListMoveExtraDigits  apcsaListMoveExtraBaseDigits  apcsaListMoveGreaterThan 
Authoring docs

Copyright Nick Parlante 2017 - privacy