« All Events
4 PM – USACO – Gamas
December 20, 2024 @ 4:00 pm - 5:00 pm
Today We Did
- We reviewed last week homework.
- We learn how to do isPalindrome
- We learn how to copy and array and insert a new element in the middle of the new array.
Homework
- No class until Jan 9, 2025. Merry Christmas and Happy New Year.
- Inside Dec20Palindrome.java
- create a new method “public boolean isPalindromeIgnoreSpace(String word)”.
- This method will return true for the following
- racecar
- race car
- was it a cat i saw
- kayak
- This method will return false for the following
- gamas
- gamas go to disneyland
- Inside Dec20InsertOrDeleteInTheMiddleArray.java
- create a new method “public String[] copyAndDeletetInMiddle(String[] oldArr, int index)”
- String[] arr = new String[]{“a”,”b”,”c”};
- String[] newArr = main.copyAndDeleteInMiddle(arr, 1);
- // result [“a”, “c”]