본문 바로가기

티라미수 코딩생활

검색하기
티라미수 코딩생활
프로필사진 Aosta

  • 분류 전체보기 (22)
    • Programming (12)
      • Android (6)
      • Swift (4)
      • HTML (1)
      • JSP (1)
    • Diary (0)
    • My Library (7)
      • Swift (6)
      • Swift 꺼내먹기 (1)
      • Android (0)
    • 코딩테스트 & 자료구조 (2)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/06   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Tags
  • LeetCode
  • jsp
  • startActivityForResult
  • #Android
  • TDD
  • html
  • Flutter
  • android
  • Kotlin
  • JUnit
  • GetValue
  • GregorianCalendar
  • tag
  • setValue
  • livedata
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록LeetCode (1)

티라미수 코딩생활

[LeetCode, Kotlin] 14. Longest Common Prefix 풀어보기

문제 Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Input: strs = ["flower","flow","flight"] Output: "fl" class Solution { fun longestCommonPrefix(strs: Array): String { } } 처음에 prefix 라는 단어를 놓쳐서 문제를 보자마자 기겁했었습니다. 전 배열에 공통적으로 포함되어 있는 (자리가 상관없는) String 중 가장 긴 거 찾기 인 줄 알았습니다.. 다행히 시작 위치는 앞에서부터 고정입니다. 나의 ..

코딩테스트 & 자료구조 2022. 12. 6. 18:07
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바