Leetcode 234. Palindrome Linked List
Question Given a singly linked list, determine if it is a palindrome. Example 1: Input: 1->2 Output: false Example 2: Input: 1->2->2->1 Output: true Follow up: Could you do it…
Question Given a singly linked list, determine if it is a palindrome. Example 1: Input: 1->2 Output: false Example 2: Input: 1->2->2->1 Output: true Follow up: Could you do it…
Question Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example:…
Question Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf…
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contains a single digit. Add the two…
This article will show how to use Spring Security to protect your Restful API. Project Structure SecurityConfig.java @Configuration @EnableWebSecurity @EnableGlobalMethodSecurity(prePostEnabled = true) public class SecurityConfig extends WebSecurityConfigurerAdapter { @Autowired private…
This article will show you how to integrate spring security and Keycloak together. Three main steps to do this job: Create a new Spring boot project Config Keycloak Config spring…
This post will show you how to use Java & Groovy together to build a Restful API. Make sure you have already installed the Groovy Library. If not, you can…
Java syntax is defined in the Java language specification, and the Java library is defined in the Java application program interface (API). The JDK is the software for compiling and…
Often, it is desirable to create a copy of an object. To do this, you need to use the clone method and understand the Cloneable interface. An interface contains constants…
A class can implement multiple interfaces, but it can only extend one superclass. An interface can be used more or less the same way as an abstract class, but defining…