saurus2
Saurus2
saurus2
전체 방문자
오늘
어제
  • 분류 전체보기
    • 개발
      • AJAX
    • ML Ops
    • Profile
    • 음식점
    • 배낭여행
    • 컴퓨터공학
      • 알고리즘 공부
      • C++
      • Sever 스터디
      • Java spring
      • 알고리즘 _ 문제해결
      • 딥러닝
      • Java 정리
      • Python
      • LeetCode 1000
      • Machine Learning Study
      • Sign language Detection Pro..
      • LeetCode Solutions
    • 비콘
    • 데일리 리포트
    • 유학일기
      • 영어 공부
      • Daily
    • AI Master Degree
      • Data Mining
      • AI and Data engineering
      • Math Foundations for Decisi..
      • Natural Language Processing

블로그 메뉴

  • 홈
  • 태그
  • 미디어로그
  • 위치로그
  • 방명록

공지사항

인기 글

태그

  • 취업준비
  • 딥러닝
  • two pointer
  • 취준
  • 개발자 취업준비
  • 알고리즘
  • BFS
  • 알고리즘문제해결
  • 백준
  • 온라인저지
  • DFS
  • c++
  • 리트코드
  • 딕셔너리
  • LeetCode
  • 문제해결능력
  • 개발자
  • 릿코드
  • 파이썬
  • Python

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
saurus2

Saurus2

[LeetCode] 100 Same Tree [Easy] 같은 트리
컴퓨터공학/LeetCode Solutions

[LeetCode] 100 Same Tree [Easy] 같은 트리

2023. 10. 13. 09:01

100. Same Tree

 

Given the roots of two binary trees p and q, write a function to check if they are the same or not.

Two binary trees are considered the same if they are structurally identical, and the nodes have the same value.

 

Example 1:

Input: p = [1,2,3], q = [1,2,3]
Output: true

Example 2:

Input: p = [1,2], q = [1,null,2]
Output: false

Example 3:

Input: p = [1,2,1], q = [1,1,2]
Output: false

 

Constraints:

  • The number of nodes in both trees is in the range [0, 100].
  • -104 <= Node.val <= 104
 

 

해설 풀이

https://www.youtube.com/watch?v=f1cFqsdlmxg 

 

저작자표시 (새창열림)

'컴퓨터공학 > LeetCode Solutions' 카테고리의 다른 글

개발자가 되는 방법!! 코딩세끼 릿코드 스터디 지금 시작합니다 [안내영상]  (0) 2023.10.14
릿코드가 도대체 뭐야? 개발자가 되고 싶으면 뭐 부터 공부해야하지? 무조건 공부해야하는 코딩 테스트 준비!!  (0) 2023.10.14
[LeetCode] 1299. Replace Elements with Greatest Element on Right Side  (0) 2023.01.13
[LeetCode] 13. Roman to Integer  (0) 2023.01.13
[LeetCode] 504. Base 7  (0) 2023.01.12
    '컴퓨터공학/LeetCode Solutions' 카테고리의 다른 글
    • 개발자가 되는 방법!! 코딩세끼 릿코드 스터디 지금 시작합니다 [안내영상]
    • 릿코드가 도대체 뭐야? 개발자가 되고 싶으면 뭐 부터 공부해야하지? 무조건 공부해야하는 코딩 테스트 준비!!
    • [LeetCode] 1299. Replace Elements with Greatest Element on Right Side
    • [LeetCode] 13. Roman to Integer
    saurus2
    saurus2
    Simple is Best

    티스토리툴바