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

tmhscs@gmail.com lists

List Problems!

The following problems will test your ability to use Lists and their methods.
The code snippets below will help you remember how to use them!

List<Integer> list = new ArrayList<Integer>(); // creates a list of integers
List<String> list = new ArrayList<String>(); // creates a list of Strings
list.add(value); // adds value to the end
list.add(index, value); // insert value at index
list.remove(index); // removes value at index
list.get(index); // returns value at index
list.set(index, value); // changes index to now store value
list.size(); // returns the number of values in the list

Easy Section

01. list_howManyNumbers H   (list_howManyNumbers)
02. list_firstValue H   (list_firstValue)
03. list_lastValue H   (list_lastValue)
04. apcsaListSize  (apcsaListSize)
05. apcsaListAddEnd  (apcsaListAddEnd)
06. apcsaListAddBeginning  (apcsaListAddBeginning)
07. apcsaListAddSize  (apcsaListAddSize)
08. apcsaListAddRepeat  (apcsaListAddRepeat)
09. apcsaListSetRotation  (apcsaListSetRotation)
10. apcsaListCreateFromParams  (apcsaListCreateFromParams)
11. apcsaListRemoveSomewhere  (apcsaListRemoveSomewhere)
12. apcsaListRemoveFirstMatch  (apcsaListRemoveFirstMatch)
13. apcsaListAverageRemovals  (apcsaListAverageRemovals)
14. apcsaListReplaceThird  (apcsaListReplaceThird)
15. apcsaListReplaceSomewhere  (apcsaListReplaceSomewhere)
16. apcsaListFromArray  (apcsaListFromArray)
17. apcsaListToArray  (apcsaListToArray)
18. apcsaListInsertThrice  (apcsaListInsertThrice)

Medium Section

19. list_sumElements H   (list_sumElements)
20. list_averageElements H   (list_averageElements)
21. list_removeEvens H   (list_removeEvens)
22. list_removeNegatives H   (list_removeNegatives)
23. list_getLargest H   (list_getLargest)
24. list_getSmallest H   (list_getSmallest)
25. list_contains7 H   (list_contains7)
26. list_containsValue H   (list_containsValue)
27. list_swapEnds H   (list_swapEnds)
28. list_shiftRight H   (list_shiftRight)
29. list_shiftLeft H   (list_shiftLeft)
30. list_longestWord H   (list_longestWord)
31. list_removeOddWords H   (list_removeOddWords)
32. list_furtherAway H   (list_furtherAway)
33. list_reverse H   (list_reverse)
34. list_scaredyCat H   (list_scaredyCat)
35. list_noWordsWithA H   (list_noWordsWithA)
36. list_removeAudioOutliers H   (list_removeAudioOutliers)
37. list_levelField H   (list_levelField)
38. list_wisestCouple H   (list_wisestCouple)
39. list_combine H   (list_combine)
40. list_interleave H   (list_interleave)
41. list_integerDigitList H   (list_integerDigitList)
42. list_golfingBros H   (list_golfingBros)
43. list_evenlyOdd H   (list_evenlyOdd)
44. apcsaListAddLargestValue  (apcsaListAddLargestValue)
45. apcsaListAddLargestIndex  (apcsaListAddLargestIndex)
46. apcsaListAllInBetweens  (apcsaListAllInBetweens)
47. apcsaListReplaceZeros  (apcsaListReplaceZeros)
48. apcsaListHalfBeforeZeros  (apcsaListHalfBeforeZeros)
49. apcsaListAddNegations  (apcsaListAddNegations)
50. apcsaListFindClosest  (apcsaListFindClosest)
51. apcsaListRemoveCloseUnder  (apcsaListRemoveCloseUnder)
52. apcsaListPricedRight  (apcsaListPricedRight)
53. apcsaListFirstCharacters  (apcsaListFirstCharacters)
54. apcsaListOrderedCharacters  (apcsaListOrderedCharacters)
55. apcsaListJustCharacters  (apcsaListJustCharacters)
56. apcsaListOthersContained  (apcsaListOthersContained)
57. apcsaListModMover  (apcsaListModMover)
58. apcsaListAddSplice  (apcsaListAddSplice)

Hard Section

59. apcsaListCompletePairs  (apcsaListCompletePairs)
60. apcsaListElementsToIndexes  (apcsaListElementsToIndexes)
61. apcsaListFrequencies  (apcsaListFrequencies)
62. apcsaListMoveExtraDigits  (apcsaListMoveExtraDigits)
63. apcsaListMoveExtraBaseDigits  (apcsaListMoveExtraBaseDigits)
64. apcsaListMoveGreaterThan  (apcsaListMoveGreaterThan)

Authoring docs

Copyright Nick Parlante 2017 - privacy