본문 바로가기
반응형

전체 글193

[LeetCode.412][easy] Fizz Buzz https://leetcode.com/problems/fizz-buzz/ Fizz Buzz - 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 접근 방법 1부터 n까지에 대해 3과5의 공배수인지, 3의 배수인지, 5의 배수인지 체크한다. O(n)의 시간복잡도를 차지하는 알고리즘으로 풀었다. 풀이 코드 class Solution { public: vector fizzBuzz(int n) { vector ans; for(int i=1;i 2021. 10. 30.
[flutter] How to keep the contents in the tab even if the tab is moved - Inde [flutter플러터] How to keep the contents in the tab even if the tab is moved - IndexedStack (Tab 이동하더라도 Tab 내의 내용은 유지되도록 하는 방법 - IndexedStack) 기존에는 아래와 같이 탭바를 사용하였지만 탭을 이동하고 돌아오니 기존의 내용이 초기화되는 문제가 있었다. (Previously, the tab bar was used as follows, but when the tab was moved and returned, there was a problem that the existing content was initialized.) return Scaffold( body: _children[_currentIndex],.. 2021. 10. 29.
[flutter][Solved] no connected devices found please connect a device [flutter] [Solution] no connected devices found please connect a device https://stackoverflow.com/questions/54793409/no-connected-devices-found-please-connect-a-device-or-see-flutter-io-setup-for No connected devices found; please connect a device, or see flutter.io/setup for getting started instructions i am using the Android Studion 3.3 on Windows 10. i have created a emulator and it is runnin.. 2021. 10. 28.
[LeetCode.454][middle] 4Sum II https://leetcode.com/problems/4sum-ii/ 4Sum II - 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 초기 접근 방법 일단 브루트포스 알고리즘으로 접근했다. 모든 경우의 수를 4중 for loop 돌려서 전체를 탐색했다. 테스트케이스는 통과했지만, 시간초과 에러로 실패했다. 초기 코드 class Solution { public: int fourSumCount(vector& nums1, vector& nums2, vector& nu.. 2021. 10. 28.
반응형