Nitin Agrawal
Contact -
  • Home
  • Interviews
    • Secret Receipe
    • InterviewFacts
    • Resume Thoughts
    • Daily Coding Problems
    • BigShyft
    • Companies
    • Interviews Theory
  • Programming Languages
    • Java Script >
      • Tutorials
      • Code Snippets
    • Reactive Programming >
      • Code Snippets
    • R
    • DataStructures >
      • LeetCode Problems >
        • Problem10
        • Problem300
      • AnagramsSet
    • Core Java >
      • Codility
      • Program Arguments OR VM arguments & Environment variables
      • Java Releases >
        • Java8 >
          • Performance
          • NasHorn
          • WordCount
          • Thoughts
        • Java9 >
          • ServiceLoaders
          • Lambdas
          • List Of Objects
          • Code Snippets
        • Java14 >
          • Teeing
          • Pattern
          • Semaphores
        • Java17 >
          • Switches
          • FunctionalStreams
          • Predicate
          • Consumer_Supplier
          • Collectors in Java
        • Java21 >
          • Un-named Class
          • Virtual Threads
          • Structured Concurrency
      • Threading >
        • ThreadsOrder
        • ProducerConsumer
        • Finalizer
        • RaceCondition
        • Executors
        • Future Or CompletableFuture
      • Important Points
      • Immutability
      • Dictionary
      • Sample Code Part 1 >
        • PatternLength
        • Serialization >
          • Kryo2
          • JAXB/XSD
          • XStream
        • MongoDB
        • Strings >
          • Reverse the String
          • Reverse the String in n/2 complexity
          • StringEditor
          • Reversing String
          • String Puzzle
          • Knuth Morris Pratt
          • Unique characters
          • Top N most occurring characters
          • Longest Common Subsequence
          • Longest Common Substring
        • New methods in Collections
        • MethodReferences
        • Complex Objects Comparator >
          • Performance
        • NIO >
          • NIO 2nd Sample
        • Date Converter
        • Minimum cost path
        • Find File
      • URL Validator
    • Julia
    • Python >
      • Decorators
      • String Formatting
      • Generators_Threads
      • JustLikeThat
    • Go >
      • Tutorial
      • CodeSnippet
      • Go Routine_Channel
      • Suggestions
    • Methodologies & Design Patterns >
      • Design Principles
      • Design Patterns >
        • TemplatePattern
        • Adapter Design Pattern
        • Proxy
        • Lazy Initialization
        • CombinatorPattern
        • Singleton >
          • Singletons
        • Strategy
  • Frameworks
    • Apache Velocity
    • React Library >
      • Tutorial
    • Spring >
      • Spring Boot >
        • CustomProperties
        • ExceptionHandling
        • Custom Beans
        • Issues
      • Quick View
    • Rest WebServices >
      • Interviews
      • Swagger
    • Cloudera BigData >
      • Ques_Ans
      • Hive
      • Apache Spark >
        • ApacheSpark Installation
        • SparkCode
        • Sample1
        • DataFrames
        • RDDs
        • SparkStreaming
        • SparkFiles
    • Integration >
      • Apache Camel
    • Testing Frameworks >
      • JUnit >
        • JUnit Runners
      • EasyMock
      • Mockito >
        • Page 2
      • TestNG
    • Blockchain >
      • Ethereum Smart Contract
      • Blockchain Java Example
    • Microservices >
      • Messaging Formats
      • Design Patterns
    • AWS >
      • Honeycode
    • Dockers >
      • GitBash
      • Issues
      • Kubernetes
  • Databases
    • MySql
    • Oracle >
      • Interview1
      • SQL Queries
    • Elastic Search
  • Random issues
    • TOAD issue
    • Architect's suggestions
    • Dynamic loading of agents
  • Your Views

EPAM Interview April2023

4/15/2023

0 Comments

 
First Round: Codility test having 2 problems to solve in 80 mins like-
 a) Replace '? in the given string, such that no 2 adjacent alphabets are same.
     Alphabets will be in small case only.
 b) You are given array of numbers such each index represents a person & number shows
      that how many people that person can have in the same room including him/herself.
      Now you need to find the number of rooms required to accomodate all the people.
    e.g. {1,1,1,1,1} Ans:5
           {2,1,4} Ans:2

Second Round: Had basic discussion then got 3 coding problems like-
 a) determine if source string can be made equal to target string by either
      adding/deleting/replacing one character.
 b) determine the number of add/delete/replace operations needed to make source string
      equal to target string.
 c) An array pid contains the id of processes & and array ppid contains the parent id of the id at
     that index. You are given 1 process id to terminate.
     Now return the list of ids will be terminated including the given id.
     e.g. Input: pid = [1,3,10,5], ppid = [3,0,5,3], kill = 5
           
Output: [5,10]
 Solution: Create a Map
<Integer, List<Integer>> such that key will be process id & value will
                contain list of its child ids. Now iterate through this map to get the list of deleted ids.

0 Comments

EPAM Interview

6/1/2022

0 Comments

 
I applied for one position with EPAM.
 First I had 30 mins discussion with its recruiter then next day 90 mins technical discussion
was scheduled with its panel named some 'G* Verma'.
 Initially interviewer was reluctant to share his video also, but after 2-3 mins discussion he got
agreed to come one video for this video meet.
 He checked about various areas like-
1) Agile vs Kanban
2) Saga Design pattern
3) Java Design patterns
4) IdentityHashMap
5) Spring aware classes
6) Spring Security
7) JWT structure & purpose
8) Kafka
9) Cloud
10) CI/CD pipeline
11) Find the 5th Highest salaried employee from Employee table in database.
12) 1-2 questions about DB concepts
13) Find the problem in the given code having lambda expression
14) Below code is given-
method(Customer cust) {
  if(cust == null)
     throw new Exception();
  else
      callAnotherMethod();
}
 Now convert this if else block to one liner using java8 feature.
 I suggested to use Optional but I was not able to recall the API properly & I was also not in
favor of Optional just for this case.
 And one has to decide for this, as readability & maintanability needs to be considered before
making the code too concise.
 Here, if you have lot of such checks before you can execute your main logic then better
use assert, if having only one such if condition then better leave it like this.
 But if you want to start some other process if condition fails then can use Optional like shown
below-
Optional usage

    
 Otherwise I will prefer to stick to simple if-else here, but as I said earlier if you are having
​multiple various checks before your actual business logic kicks in, then can have like-
Assert

    
 Ultimately, your target should be to make the code readable & efficient, not making the code concise.
0 Comments

    Author

    Nitin Agrawal

    Archives

    April 2023
    June 2022

    Categories

    All

Powered by Create your own unique website with customizable templates.