This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.greg82p.skeleton.config; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import com.fasterxml.jackson.databind.module.SimpleModule; | |
| import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; | |
| import com.fasterxml.jackson.datatype.jsr310.PackageVersion; | |
| import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; | |
| import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DELIMITER // | |
| CREATE PROCEDURE getFreePublicNum( | |
| IN _TYPE tinyint(4), | |
| IN _STATUS tinyint(4), | |
| OUT _PUBLICNUM varchar(12) | |
| ) | |
| BEGIN | |
| DECLARE freeOne varchar(12); | |
| DECLARE affected tinyint(4); | |
| DECLARE EXIT handler FOR SQLEXCEPTION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package leetcode.merge_two_sorted_list; | |
| import org.junit.Test; | |
| /** | |
| * Definition for singly-linked list. | |
| * public class ListNode { | |
| * int val; | |
| * ListNode next; | |
| * ListNode(int x) { val = x; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package leetcode.valid_parentheses; | |
| import org.junit.Test; | |
| import java.util.EmptyStackException; | |
| import java.util.Stack; | |
| import static org.junit.Assert.assertFalse; | |
| import static org.junit.Assert.assertTrue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package leetcode.longest_common_prefix; | |
| import org.junit.Test; | |
| public class Solution { | |
| @Test | |
| public void test() { | |
| String[] strs = {"geeksforgeeks", "geeks", "geek", "geezer"}; | |
| String longestCommonPrefix = longestCommonPrefix(strs); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package leetcode.palindrome_number; | |
| import org.junit.Test; | |
| import static org.junit.Assert.assertFalse; | |
| import static org.junit.Assert.assertTrue; | |
| public class Solution { | |
| public int reverse(int x) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package leetcode.reverse_integer; | |
| public class Solution2 { | |
| public static void main(String[] args) { | |
| Solution2 s = new Solution2(); | |
| int result = s.reverse(123); | |
| assert result == 321; | |
| System.out.println(result); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package leetcode.two_sum; | |
| import org.junit.Test; | |
| import java.util.Arrays; | |
| public class BruteForceSolution { | |
| @Test | |
| public void test() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package leetcode.add_two_numbers; | |
| import org.junit.Test; | |
| import static org.junit.Assert.assertSame; | |
| public class Solution { | |
| @Test | |
| public void test() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.junit.Test; | |
| import java.util.Arrays; | |
| import static org.hamcrest.CoreMatchers.equalTo; | |
| import static org.junit.Assert.assertThat; | |
| public class SelectionSort { | |
| @Test |
NewerOlder