Algorithm

· Algorithm/Go
https://leetcode.com/problems/climbing-stairs/submissions/ Climbing Stairs - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com package main func main() { // n := 3 // n := 4 // n := 5 n := 6 // n := 7 climbStairs(n) } func climbStairs(n int) int { a, b := 1, 1 for i := 1; i < n; i++ ..
· Algorithm/Go
https://leetcode.com/problems/remove-element/ Remove Element - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com package main func main() { // nums := []int{3, 2, 2, 3} // val := 3 nums := []int{0, 1, 2, 2, 3, 0, 4, 2} val := 2 removeElement(nums, val) } func removeElement(nums []int..
· Algorithm/Go
https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ Best Time to Buy and Sell Stock - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com // https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ package main func main() { prices := []int{7, 1, 5, 3, 6, 4} // prices ..
· Algorithm/Go
https://leetcode.com/problems/adding-spaces-to-a-string/ Adding Spaces to a String - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com // https://leetcode.com/problems/adding-spaces-to-a-string/ package main import ( "fmt" "strings" ) func main() { // s := "LeetcodeHelpsMeLearn" // s..
· Algorithm/Go
https://leetcode.com/problems/maximum-subarray/submissions/ Maximum Subarray - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com package main // https://leetcode.com/problems/maximum-subarray/ func main() { // nums := []int{-2,1,-3,4,-1,2,1,-5,4} nums := []int{5, 4, -1, 7, 8} // nums..
· Algorithm/Go
https://leetcode.com/problems/longest-common-prefix/ Longest Common Prefix - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com package main package main // https://leetcode.com/problems/longest-common-prefix/ import ( "strings" ) func main() { // strs := []string{"flower", "flow", "f..
· Algorithm/Go
https://leetcode.com/problems/longest-substring-without-repeating-characters/ Longest Substring Without Repeating Characters - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Go 언어에서는 유니코드(UTF-8)를 표현할 때 rune 을 사용하는데 자꾸 string 화 시키려는 버릇이 있다 익숙하지가 않아서.. rune 좀 봐야될듯.. package main fun..
· Algorithm/Go
https://leetcode.com/problems/minimum-index-sum-of-two-lists/submissions/ Minimum Index Sum of Two Lists - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Golang~ map 유용하게 사용되니까 진짜러 익숙하게.. 그리고 map for loop 순서 보장 안되는거~ 알고 있었지만 한번 더 체크 package main func main() { // list1 := []string{..
임쟌
'Algorithm' 카테고리의 글 목록