摘要: Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the or 阅读全文
posted @ 2019-02-13 20:41 TobicYAL 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted f 阅读全文
posted @ 2019-02-13 20:13 TobicYAL 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place. Example 1: Example 2: Follow up: A straight forward solu 阅读全文
posted @ 2019-02-13 20:04 TobicYAL 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2. You have the following 3 operations permitt 阅读全文
posted @ 2019-02-13 19:40 TobicYAL 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Given an absolute path for a file (Unix-style), simplify it. Or in other words, convert it to the canonical path. In a UNIX-style file system, a perio 阅读全文
posted @ 2019-02-13 18:23 TobicYAL 阅读(172) 评论(0) 推荐(0) 编辑