Nitin Agrawal
Contact -
  • Home
  • Interviews
    • InterviewFacts
    • Resume Thoughts
    • Daily Coding Problems
    • BigShyft
    • Companies >
      • InvestmentBanks >
        • ECS
        • Bank Of America
        • WesternUnion
        • WellsFargo
      • ProductBasedCompanies >
        • Google
        • Microsoft >
          • Microsoft
        • CA Technologies
        • Model N India
        • Verizon Media
        • Oracle & GoJek
        • IVY Computec
        • Nvidia
        • Samsung
        • ClearWaterAnalytics
        • ADP
        • ServiceNow
        • Pubmatic
        • Expedia
        • Amphora
        • CDK Global
        • Delphix
        • Fractal Enterprises LLP
        • CDK Global
        • Tide-Banking
        • Epic
        • Sincro-Pune
        • Whiz.AI
        • ChargePoint
      • ServiceBasedCompanies >
        • Sapient
        • Altimetrik
        • ASG World Wide Pvt Ltd
        • Paraxel International & Pramati Technologies Pvt Ltd
        • MitraTech
        • Intelizest Coding Round
    • Interviews Theory
  • Programming Languages
    • Java Script >
      • Tutorials
      • Code Snippets
    • Reactive Programming >
      • Code Snippets
    • R
    • DataStructures >
      • LeetCode Problems
      • AnagramsSet
    • Core Java >
      • Codility
      • Threading >
        • ThreadsOrder
        • ProducerConsumer
        • Finalizer
        • RaceCondition
        • Executors
        • Future Or CompletableFuture
      • Important Points
      • Immutability
      • Dictionary
      • URL Validator
    • Julia
    • Python >
      • Decorators
      • String Formatting
      • Generators_Threads
      • JustLikeThat
    • Go >
      • Tutorial
      • CodeSnippet
      • Go Routine_Channel
      • Suggestions
    • Methodologies & Design Patterns >
      • Design Principles
      • Design Patterns >
        • Decorator
        • Proxy
        • Lazy Initialization
        • CombinatorPattern
        • RequestChaining
        • Singleton >
          • Singletons
  • Frameworks
    • Apache Velocity
    • Spring >
      • Spring Boot >
        • CustomProperties
        • ExceptionHandling
        • 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
  • Databases
    • MySql
    • Oracle >
      • Interview1
      • SQL Queries
    • Elastic Search >
      • StudySources
  • Random issues
    • TOAD issue
    • Architect's suggestions
  • Your Views
I was interviewed by Fractal in month of April 2020 for Senior Developer role.
Below are the questions I got during that 40 minutes interview-

Question 1 : Find LCA in the given binary for the given numbers.
Solution : One can see the solution on internet which I don't feel is correct. The idea which I felt correct is Here.

Question 2 : Square fence and dog puzzle.
Solution : ​https://www.youtube.com/watch?v=roudL8FHk2k

Question 3 : Given two four digit prime numbers, suppose 1033 and 8179, we need to find the shortest path from 1033 to
                     8179 by altering only single digit at a time such that every number that we get after changing a digit is prime. For
                     example a solution is 1033, 1733, 3733, 3739, 3779, 8779, 8179
Solution : Below is my solution, which I have not tested thorughly, neither have improved further. And it took me more than 2
                  hours, after interview. Please provide your feedback. Combine the code in both the images to get the complete
​                  working code. I don't guarantee that it is giving the shortest path always, but surely it gives you the idea about the
                  approach. Try with any valid Integer values, except max values of 9-10 digit values.
                  
I have attached improved version in the last which worked for 9-10 digit valid values & it took 6 hours more to have
​                  this version.
Picture
Picture
Picture
This is a slow version, I have another version which is 100 times faster than above code. If anyone needs that please let me know.
Powered by Create your own unique website with customizable templates.