博客专栏  >  编程语言   >  基础算法

基础算法

leetcode基础算法题(编程语言C++)

关注
2 已关注
146篇博文
  • 48. Rotate Image

    题目You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise)....

    前天 14:08
    164
  • 6. 3Sum Closest

    题目Given an array S of n integers, find three integers in S such that the sum is closest to a given n...

    2017-09-11 09:31
    20
  • 17. Letter Combinations of a Phone Number

    题目Given a digit string, return all possible letter combinations that the number could represent.A ma...

    2017-09-11 10:40
    22
  • 18. 4Sum

    题目Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = t...

    2017-09-11 10:57
    23
  • 22. Generate Parentheses

    题目Given n pairs of parentheses, write a function to generate all combinations of well-formed parenth...

    2017-09-12 09:30
    22
  • 24. Swap Nodes in Pairs

    题目Given a linked list, swap every two adjacent nodes and return its head.For example, Given 1->2->3...

    2017-09-12 11:02
    21
  • 19. Remove Nth Node From End of List

    题目Given a linked list, remove the nth node from the end of list and return its head.For example,Give...

    2017-09-12 11:19
    20
  • 4. Median of Two Sorted Arrays

    题目There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the tw...

    2017-09-13 08:50
    35
  • 29. Divide Two Integers

    题目Divide two integers without using multiplication, division and mod operator.If it is overflow, ret...

    2017-09-13 09:55
    16
  • 31. Next Permutation

    题目Implement next permutation, which rearranges numbers into the lexicographically next greater permu...

    2017-09-13 10:42
    18
  • 33. Search in Rotated Sorted Array

    题目Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e...

    5天前 09:17
    16
  • 34. Search for a Range

    题目Given an array of integers sorted in ascending order, find the starting and ending position of a g...

    5天前 09:35
    21
  • 36. Valid Sudoku

    题目Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be...

    5天前 14:04
    20
  • 39. Combination Sum

    题目Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique...

    3天前 14:31
    25
  • 40. Combination Sum II

    题目Given a collection of candidate numbers (C) and a target number (T), find all unique combinations ...

    3天前 15:05
    36
  • 43. Multiply Strings

    题目Given two non-negative integers num1 and num2 represented as strings, return the product of num1 a...

    3天前 16:11
    45
  • 46. Permutations

    题目Given a collection of distinct numbers, return all possible permutations.For example, [1,2,3] hav...

    前天 10:21
    154
  • 47. Permutations II

    题目Given a collection of numbers that might contain duplicates, return all possible unique permutatio...

    前天 10:29
    162
  • 6. ZigZag Conversion

    The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you...

    2017-09-04 13:52
    28
  • 8. String to Integer (atoi)

    Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases...

    2017-09-04 14:30
    23

机器学习
131818

img博客搬家
img撰写博客
img专家申请
img意见反馈
img返回顶部