Algorithm/leetcode
Leetcode86. partition list (kotlin)
Leetcode86. partition list (kotlin)
2023.04.22https://leetcode.com/problems/partition-list/ Partition List - LeetCode Can you solve this real interview question? Partition List - Given the head of a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the no leetcode.com Given the head of a linked list and a value x, partition..
Leetcode79. Word Search (w. kotlin)
Leetcode79. Word Search (w. kotlin)
2023.04.16Given an m x n grid of characters board and a string word, return true if word exists in the grid. The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once. Example 1: val board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]] val word = "SEE" Output: true..
Easy - 9 . is palidrome (with golang)
Easy - 9 . is palidrome (with golang)
2022.04.21Given an integer x, return true if x is palindrome integer. An integer is a palindrome when it reads the same backward as forward. For example, 121 is a palindrome while 123 is not. Example 1: Input: x = 121 Output: true Explanation: 121 reads as 121 from left to right and from right to left. Example 2: Input: x = -121 Output: false Explanation: From left to right, it reads -121. From right to l..