├── INTERFACE.java ├── Kadane's Algorithm ├── PALINDROME.java ├── REVERSE_THE_NUMBER.java └── string methods.java /INTERFACE.java: -------------------------------------------------------------------------------- 1 | interface Animal{ 2 | void walk(); 3 | } 4 | interface dog{ 5 | void bark(); 6 | } 7 | class Man implements Animal,dog{ 8 | public void walk(){ 9 | System.out.println("ANIMAL CAN WALK"); 10 | } 11 | public void bark(){ 12 | System.out.println("DOG CAN WALK"); 13 | } 14 | } 15 | 16 | 17 | public class interface1{ 18 | public static void main(String args[]){ 19 | Man a1=new Man(); 20 | a1.walk(); 21 | a1.bark(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Kadane's Algorithm: -------------------------------------------------------------------------------- 1 | class Solution { 2 | int maxSubarraySum(int[] arr) { 3 | 4 | int currentSum = arr[0]; 5 | int maxSum = arr[0]; 6 | 7 | for(int i = 1; i