본문 바로가기

IT/[Everyday]Coding39

SdkManager (Error) Warning: Could not create settings Warning: Could not create settings java.lang.IllegalArgumentException at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.(SdkManagerCliSettings.java:428) at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.createSettings(SdkManagerCliSettings.java:152) at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.createSettings(SdkManagerCliSettings.java:134) at com.android.sdklib.. 2020. 9. 11.
the longest palindromic substring Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example 1:Input: "babad" Output: "bab" Note: "aba" is also a valid answer. Example 2:Input: "cbbd" Output: "bb"​Palindromic 이라는 것은 회기되는 단어를 이야기 한다. 예를들어 "토마토", "스위스" 와 같은 문장이다. 위 문제에서는 가장 긴 회기단어를 추출하라는 것이다. ​Python Solution:class Solution: def longestPalindrome(self, s: str) -> str:.. 2019. 3. 6.
Number of 1 Bits Write a function that takes an unsigned integer and return the number of '1' bits it has (also known as the Hamming weight). Example 1:Input: 00000000000000000000000000001011 Output: 3 Explanation: The input binary string 00000000000000000000000000001011 has a total of three '1' bits. Example 2:Input: 00000000000000000000000010000000 Output: 1 Explanation: The input binary string 000000000000000.. 2019. 1. 24.
Hamming Distance The Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calculate the Hamming distance.Note: 0 ≤ x, y < 231.Example:Input: x = 1, y = 4 Output: 2 Explanation: 1 (0 0 0 1) 4 (0 1 0 0) ↑ ↑ The above arrows point to positions where the corresponding bits are different. To solve this problem I used XOR operation.M.. 2019. 1. 23.
반응형