Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: AllenDowney/ThinkDataStructures
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: junoade/ThinkDataStructures_Study
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 15 commits
  • 5 files changed
  • 2 contributors

Commits on Apr 2, 2023

  1. init: practice2 & practice3

    junoade committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    ef5df00 View commit details
    Browse the repository at this point in the history
  2. feat: add()

    1. size와 capacity를 비교해서 grow하는 알고리즘
    2. 그 후 add()
    3. return true
    junoade committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    77309b7 View commit details
    Browse the repository at this point in the history
  3. refactor: add(int index, T elememt)

    method extraction
    - private void rangeCheckForAdd(int index);
    - private String outOfBoundMsg(int index);
    junoade committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    2402490 View commit details
    Browse the repository at this point in the history
  4. feat: indexOf()

    junoade committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    6a4ea32 View commit details
    Browse the repository at this point in the history
  5. feat: indexOf()

    junoade committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    5009a46 View commit details
    Browse the repository at this point in the history
  6. feat: remove()

    public T remove(int index); 작성
    junoade committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    f3e07c8 View commit details
    Browse the repository at this point in the history
  7. fix: add

    remove TODO comment
    junoade committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    d111797 View commit details
    Browse the repository at this point in the history
  8. Merge pull request #1 from junoade/feat_MyArrayList

    Feat my array list
    junoade authored Apr 2, 2023
    Configuration menu
    Copy the full SHA
    1338fe7 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2023

  1. fix: T remove(int index);

    fix assignment semantic error
    
    as is
    ```java
    final int newSize = size = 1; // index < newSize
    ```
    
    to be
    ```java
    final int newSize = size - 1; // index < newSize
    ```
    junoade committed Apr 7, 2023
    Configuration menu
    Copy the full SHA
    126c39a View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2 from junoade/feat_MyArrayList

    fix: T remove(int index);
    junoade authored Apr 7, 2023
    Configuration menu
    Copy the full SHA
    99750e0 View commit details
    Browse the repository at this point in the history
  3. feat: indexOf, add 메소드

    public int indexOf(Object target);
    public void add(int index, E element);
    junoade committed Apr 7, 2023
    Configuration menu
    Copy the full SHA
    b831c28 View commit details
    Browse the repository at this point in the history
  4. fix: indexOf 메소드

    참조형 객체 간 == 연산 주의하기
    junoade committed Apr 7, 2023
    Configuration menu
    Copy the full SHA
    30d57ed View commit details
    Browse the repository at this point in the history
  5. feat: remove 연산

    beforePtr, 현재 ptr를 두면서 링크드 리스트 순회하도록 구현
    junoade committed Apr 7, 2023
    Configuration menu
    Copy the full SHA
    a26dc3e View commit details
    Browse the repository at this point in the history
  6. fix: indexOf(Object target);

    - target이 null이더라도 index가 반환될 수 있게
    as is
    ```java
    @OverRide
    public int indexOf(Object target) {
    	if(target == null) {
              return -1;
          } else {
              Node ptr = head;
              int index = 0;
              for(; ptr != null; ptr = ptr.next, index++) {
                  // if(ptr.data == target) { return index; }
    							if(equals(target, ptr.data)) {
                      return index;
                  }
              }
          }
    	return -1;
    }
    
    to be
    ```java
    @OverRide
    	public int indexOf(Object target) {
            // target이 null일 때도 검색은 되게 해야한다.
            int index = 0;
            Node ptr = head;
            for(; ptr != null; ptr = ptr.next, index++) {
                if(equals(target, ptr.data)) { // 서로 똑같이 null 이면 true가 반환되게 됨
                    return index;
                }
            }
    		return -1;
    	}
    ```
    junoade committed Apr 7, 2023
    Configuration menu
    Copy the full SHA
    fd9de7f View commit details
    Browse the repository at this point in the history
  7. Merge pull request #3 from junoade/feat_LinkedList

    Feat linked list
    junoade authored Apr 7, 2023
    Configuration menu
    Copy the full SHA
    74cf0be View commit details
    Browse the repository at this point in the history
Loading