LeetCode 69. Sqrt(x)

發表於 2022-04-28 文章字數 192 字 所需閱讀時間 1 分鐘
  • Ping's notes
首頁 leetcode

# 思路

開根號

# 參考程式碼

static auto fast_io = []
{
	ios::sync_with_stdio(false);
	cout.tie(nullptr);
	cin.tie(nullptr);
	return 0;
}();
class Solution {
public:
    int mySqrt(int x)
    {
        return sqrt(x);
    }
};
LeetCode
更新於 2022-04-28
  • 作者: PingHe @
  • 文章連結: https://www.pinghenotes.com/leetcode/LeetCode-69-Sqrt-x/
  • 版權聲明: 本網誌所有文章除特別聲明外,均採用 (CC)BY-NC-SA 許可協議。轉載請註明出處!
上一篇 leetcode

LeetCode 67. Add Binary

下一篇 leetcode

LeetCode 70. Climbing Stairs

  1. 1. 思路
  2. 2. 參考程式碼
  • LeetCode 1. Two Sum
  • LeetCode 9. Palindrome Number
  • LeetCode 13. Roman to Integer
  • LeetCode 14. Longest Common Prefix
  • LeetCode 20. Valid Parentheses
  • LeetCode 21. Merge Two Sorted Lists
  • LeetCode 26. Remove Duplicates from Sorted Array
  • LeetCode 27. Remove Element
  • LeetCode 28. Implement strStr()
  • LeetCode 35. Search Insert Position
  • LeetCode 53. Maximum Subarray
  • LeetCode 58. Length of Last Word
  • LeetCode 66. Plus One
  • LeetCode 67. Add Binary
  • LeetCode 69. Sqrt(x)
  • LeetCode 70. Climbing Stairs
  • LeetCode 83. Remove Duplicates from Sorted List
  • LeetCode 88. Merge Sorted Array
  • LeetCode 94. Binary Tree Inorder Traversal
  • LeetCode 100. Same Tree
  • LeetCode 101. Symmetric Tree
  • LeetCode 104. Maximum Depth of Binary Tree
  • LeetCode 108. Convert Sorted Array to Binary Search Tree
  • LeetCode 110. Balanced Binary Tree
PingHe

PingHe

151 文章
5 分類
52 標籤
  • 首頁
  • 關於
  • 文章
    • 歸檔
    • 分類
    • 標籤
  • 朋友

隨機文章

  • Uva Problems
    UVa 10827 - Maximum sum on a torus
  • Uva Problems
    UVa 10642 - Can You Solve It
  • leetcode
    LeetCode 70. Climbing Stairs
  • Uva Problems
    UVa 11463 - Commandos
  • Uva Problems
    UVa 118 - Mutant Flatworld Explorers
  • leetcode
    LeetCode 104. Maximum Depth of Binary Tree
  • Uva Problems
    UVa 10171 - Meeting Prof. Miguel
  • leetcode
    LeetCode 26. Remove Duplicates from Sorted Array
  • Uva Problems
    UVa 481 - What Goes Up
  • Uva Problems
    UVa 978 - Lemmings Battle

最新評論

    © 2020 – 2023 PingHe @ Ping's notes
    212k 字 | 3:13
    基於 Hexo & Theme.Shoka