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
  • Your Views

Whiz.AI Interview

5/5/2022

0 Comments

 
Whiz.AI is a startup.
Note :- In the start its people will be saying that they are open for the salary, plus they may be
           claiming that it is a brand & you will be getting lot of opportunity to grow both technically
           & financially. They will be trying to attract you saying they use AI & ML etc.
           But the reality will be different for the salary part & for technical part, I believe the reality
           is also quite opposite. Plus I also doubt about its growth as after 4 years, still they have
           not touched 100 as employee count, but they proudly say that have presence in other
           countries also. HR person(from US), with whom I had discussion for salary, was very
           rude & unprofessional.
          So take your own call to try for or join this organisation.


I got the call from its recruiter & then next day I had a 30 mins technical discussion where I was asked very basic questions to code for.
After 1 week I got the call again for the next round which was taken by its architect & he also asked very basic questions to code for, in which I fumbled.
Below are those parts where I fumbled in both the rounds -

Round 1 : In one question I was creating the map & depending on some condition I was
                  picking the key-value pair from that map & was putting that in new map.
                  For this, I was asked how can do the same without creating a new map, means I
                  was just required to remove all those pairs from the map which I don't need based
                  on that condition & it was logical also. Here I made the mistake & I was not able to
                  solve it.
                  Point to remember here is that, you shouldn't use internal iterator while iterating
                  through its keys, fetch the iterator from its key set then remove the keys as per the
                  condition from that iterator & the map will also be changed.
                  Remember, enumerator doesn't allow any change but iterator allows delete
                  operation while iterating.
                  This round took 30 mins.
Round 2 : During this round few basic theoratical questions were asked along with below
                  questions to code for -
                 1) Write the code showing the deadlock scenario.
                 2) Write the code to find the max number in the given array of double.
              For (2), I used Double.MIN_VALUE to start with & it was a mistake here, as it gives
              the smallest positive nonzero value of type double & it failed if the values in array are
              negative & I kept wondering without focusing on the documented words for
              MIN_VALUE.
              And it took time further to write the correct code for this using other traditional way.
              Or you can use Functional way to find the max from the given array.
​                 3) Write the code to find the largest & second largest in the given array of double.

     Below is the code which one try to play with deadlock scenarios & can try his/her ideas also
   to check the deadlock scenario.
     If you have other way to code for deadlock, then please comment also, so that others also
   can check.
     For other questions also, please comment your way of code...

Whiz_AI_Deadlock

    
0 Comments



Leave a Reply.

    Author

    Nitin Agrawal

    Archives

    May 2022

    Categories

    All

Powered by Create your own unique website with customizable templates.