CNoodle
  • Home
  • Archives
  • Tags
  • About

[LeetCode] 36. Valid Sudoku

Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:Each row must contain the digits 1-9 without repetition.Each column must contain
2020-04-20
#leetcode #array #hashmap #java #string

[LeetCode] 378. Kth Smallest Element in a Sorted Matrix

Given an n x n matrix where each of the rows and columns is sorted in ascending order, return the kth smallest element in the matrix. Note that it is the kth smallest element in the sorted order, not
2020-04-19
#leetcode #java #javascript #binary search #matrix #heap #merge sort

[LeetCode] 733. Flood Fill

You are given an image represented by an m x n grid of integers image, where image[i][j] represents the pixel value of the image. You are also given three integers sr, sc, and color. Your task is to p
2020-04-17
#leetcode #java #bfs #dfs #flood fill #matrix

[LeetCode] 695. Max Area of Island

You are given an m x n binary matrix grid. An island is a group of 1’s (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded
2020-04-16
#leetcode #java #bfs #dfs #flood fill

[LeetCode] 994. Rotting Oranges

You are given an m x n grid where each cell can have one of three values:0 representing an empty cell,1 representing a fresh orange, or2 representing a rotten orange.Every minute, any fresh orange tha
2020-04-16
#leetcode #array #java #javascript #bfs #flood fill

[LeetCode] 78. Subsets

Given an integer array nums of unique elements, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order. Example 1:Input: num
2020-04-16
#leetcode #array #java #backtracking

[LeetCode] 523. Continuous Subarray Sum

Given an integer array nums and an integer k, return true if nums has a good subarray or false otherwise. A good subarray is a subarray where:its length is at least two, andthe sum of the elements of
2020-04-15
#leetcode #array #hashmap #java #javascript #prefix sum #math

[LeetCode] 560. Subarray Sum Equals K

Given an array of integers nums and an integer k, return the total number of subarrays whose sum equals to k. A subarray is a contiguous non-empty sequence of elements within an array. Example 1:Input
2020-04-14
#leetcode #array #hashmap #java #javascript #prefix sum

[LeetCode] 525. Contiguous Array

Given a binary array nums, return the maximum length of a contiguous subarray with an equal number of 0 and 1. Example 1:Input: nums = [0,1]Output: 2Explanation: [0, 1] is the longest contiguous
2020-04-14
#leetcode #array #hashmap #java #javascript #prefix sum

[LeetCode] 362. Design Hit Counter

Design a hit counter which counts the number of hits received in the past 5 minutes. Each function accepts a timestamp parameter (in seconds granularity) and you may assume that calls are being made t
2020-04-14
#leetcode #java #design
1…3435363738…47

Search

Hexo Fluid