Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
https://leetcode.com/problems/count-unique-characters-of-all-substrings-of-a-given-string/ https://leetcode.com/problems/fruit-into-baskets/ https://leetcode.com/problems/minimum-number-of-k-consecutive-bit-flips/ https://leetcode.com/problems/longest-substring-without-repeating-characters/ http...
Parts of the problems don't provide C interface for solution, so I accomplished them with C++ Language. CompileCfiles using command: CompileC++files using command: g++ -std=c++11 -Wall src/bar.cpp -o bar OR You can build all the files usingmake(Use MinGW GCC and GNU Make on Windows)....
给你单链表的头节点 head ,请你反转链表,并返回反转后的链表。 示例1: 输入:head = [1,2,3,4,5] 输出:[5,4,3,2,1] 示例2: 输入:head = [1,2] 输出:[2,1] 示例3: 输入:head = [] 输出:[] 提示: 链表中节点的数目范围是 [0, 5000] -5000 <= Node.val <= 5000 进阶:链表可...
链接:https://leetcode-cn.com/problems/median-of-two-sorted-arrays/description/ 有两个大小为 m 和 n 的排序数组 nums1 和 nums2 。请找出两个排序数组的中位数并且总的运行时间复杂度为 O(log (m+n)) 。示例 1: ...
Collection of LeetCode questions to ace the coding interview! - Created using [LeetHub](https://github.com/QasimWani/LeetHub) - jay-tau/leetcode-problems
链接:https://leetcode-cn.com/problems/perfect-rectangle/description/ 题目 我们有 N 个与坐标轴对齐的矩形, 其中 N > 0, 判断它们是否能精确地覆盖一个矩形区域。 每个矩形用左下角的点和右上角的点的坐标来表示。例如, 一个单位正方形可以表示为 [1,1,2,2]。 ( 左下角的点的坐标为 (1, 1) 以...
142. 环形链表 II - 给定一个链表的头节点 head ,返回链表开始入环的第一个节点。 如果链表无环,则返回 null。 如果链表中有某个节点,可以通过连续跟踪 next 指针再次到达,则链表中存在环。 为了表示给定链表中的环,评测系统内部使用整数 pos 来表示链表尾连接到链表
给你一个rows x cols大小的矩形披萨和一个整数k,矩形包含两种字符:'A'(表示苹果)和'.'(表示空白格子)。你需要切披萨k-1次,得到k块披萨并送给别人。 切披萨的每一刀,先要选择是向垂直还是水平方向切,再在矩形的边界上选一个切的位置,将披萨一分为二。如果垂直地切披萨,那么需要把左边的部分送给一个人,如...
链接:https://leetcode.cn/problems/minimum-number-of-keypresses 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 题目给了一个字符串 s,请你设计一个带有九个按键的键盘,从而使得输入 s 的按键次数最少。键盘的形式参考例子。