Skip to content

berzhanin/interview-questions-java-spring-sql

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 

Repository files navigation

This repository will contain all the java, spring, hibernate, mysql, elastic search, thread, related questions.

Java

Spring

Hibernate

http://hibernate.org/orm/documentation/5.4/

MySql

Rest API

Elastic Search

https://www.elastic.co/guide/en/elasticsearch/reference/current/docs.html

Design Pattern

Maven

AWS

Microservice

PUZZLE

MISC

Competitive Programming

  • Find 2nd lagest number in an array? Input: {23,10,34,23,20} -> output: 23
      set arr = [23,10,34,23,20]
      int lengthOfArray = arr.length();
      int max = 0;
      int secondMax = 0;
      for(int i=0;i<lengthOfArray;i++){
      if(arr[i]>max){
      secondMax = max;
      max= arr[i];
      }
    
      s.o.p(secondMax);
    
      }
    
  • Occurance count string = "AAABBCCCDDAACCEE" then ouput : 3A2B3C2D2A2C2E
          public class Main
        {
            public static void main(String[] args) {
    
                String str = "AAABBCCCDDAACCEE";
                int strLength = str.length();
                char ch = str.charAt(0);
                int counter = 0;
                for(int i=0;i<strLength;i++){
                    if(ch == str.charAt(i)){
                        counter=counter+1;
                        continue;
                    } else {
                        System.out.print(counter);
                        System.out.print(ch);
                        counter = 1;
                        ch = str.charAt(i);
                    }
                }
                System.out.print(counter);
                System.out.print(ch);
            }
        }
    
  • all permutation of a string = "ABC" then ouput : ABC, ACB, BAC, BCA, CAB, CBA

About

This repository contains all the technical questions that has been asked to me while interviewing different companies with in India.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors