Skip to content

Add day19 #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 20, 2024
Merged

Add day19 #67

merged 1 commit into from
Jul 20, 2024

Conversation

summer2788
Copy link
Contributor

Day-19 / 박종은

문제 번호

  1. 79_WordSearch
  2. 212_WordSearchII
  3. 621_TaskScheduler

(Optional) 공유하고 싶은 내용

212_WordSearchII

  1. Consider the time complexity.
  2. You can just pass the string . Don't be stuck in passing only reference variable

621_TaskScheduler

  1. when you want to track the most left one which is not in the queue , Just create the data structure that only store the popped left one after processing.
  2. Consider which thing to choose as an index . You might not have to choose obvious thing (A,B,C...)as an index that is given in the problem.

79_WordSearch

  1. you can manipulate the parameter as well like below
board[i][j] = '#';
  1. By calling function in if statement, the code can be organized and neat
if (dfs(board, word, index + 1, i - 1, j, m, n)
            || dfs(board, word, index + 1, i + 1, j, m, n)
            || dfs(board, word, index + 1, i, j - 1, m, n)
            || dfs(board, word, index + 1, i, j + 1, m, n)) {
            return true;
        }
  1. you can reduce time by calling function if it only find the first char
if (board[i][j] == word[0]) {
                    if (dfs(board, word, 0, i, j, m, n)) {
                        return true;
                    }

Copy link

우측에 있는 Projects, Milestone, Development를 확인 후 할당 해주세요~! 🙇

Copy link
Collaborator

@kinwjdghks kinwjdghks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

정말 부지런하시군요...!

Copy link
Member

@jihostudy jihostudy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow.. 알고리즘에 진심인 남자

@summer2788 summer2788 merged commit 75d8f06 into main Jul 20, 2024
4 checks passed
@summer2788 summer2788 deleted the 17일차_Jongeun branch July 20, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants