Nitin Agrawal
Contact -
  • Home
  • Interviews
    • Secret Receipe
    • InterviewFacts
    • Resume Thoughts
    • Daily Coding Problems
    • BigShyft
    • CompanyInterviews >
      • InvestmentBanks >
        • ECS
        • Bank Of America
        • WesternUnion
        • WellsFargo
      • ProductBasedCompanies >
        • CA Technologies
        • Model N India
        • Verizon Media
        • Oracle & GoJek
        • IVY Computec
        • Nvidia
        • ClearWaterAnalytics
        • ADP
        • ServiceNow
        • Pubmatic
        • Expedia
        • Amphora
        • CDK Global
        • CDK Global
        • Epic
        • Sincro-Pune
        • Whiz.AI
        • ChargePoint
      • ServiceBasedCompanies >
        • Altimetrik
        • ASG World Wide Pvt Ltd
        • Paraxel International & Pramati Technologies Pvt Ltd
        • MitraTech
        • Intelizest Coding Round
        • EPAM
    • Interviews Theory
  • Programming Languages
    • Java Script >
      • Tutorials
      • Code Snippets
    • Reactive Programming >
      • Code Snippets
    • R
    • DataStructures >
      • LeetCode Problems
      • AnagramsSet
    • Core Java >
      • Codility
      • Program Arguments OR VM arguments & Environment variables
      • Java Releases
      • 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 >
        • TemplatePattern
        • Adapter Design Pattern
        • 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
    • Dockers >
      • GitBash
      • Issues
  • Databases
    • MySql
    • Oracle >
      • Interview1
      • SQL Queries
    • Elastic Search
  • Random issues
    • TOAD issue
    • Architect's suggestions
  • Your Views

Technical Interview at Verizon Media

I happened to be at Verizon Media for the technical discussion & below I will just give the information about the technical discussion there -

1st Round -
Question 1 : You are given array of random integers & you know that it can contain integers 1-50 only. Now you need to find
                    the missing numbers from that array.
Follow-up Questions I asked : Can the numbers be repeated in the provided array? Ans : Yes
                                                Are all 1-50 number expected in the array? Ans : Yes
                                                Is their performance or complexity constraint for the solution? Ans : No but can't use the
                                                Collection API
The method code I wrote as below -

public class MissingNumbers {
 public static void main(String[] args) {
  int[] array = {1, 4, 3, 8, 9, 11, 15, 18, 20, 14, 4, 3, 8};
  int[] result = find(array, 20);
  for(int i : result) {
   if(i == 0)
    break;
   System.out.println(i);
  }
 }
 
 public static int[] find(int[] array, int size) {
  boolean[] found = new boolean[size];
  int length = array.length;
  int[] result = new int[size];
  
  for(int i = 0; i < length; i++) {
   found[array[i]-1] = true;
  }
  
  int k = 0;
  for(int i = 0; i < size; i++) {
   if(!found[i]) {
    result[k] = i+1;
    k++;
   }
  }
  return result;
 }

}
Now the resulting array will have the missing integers & as soon as you hit '0', then it means no need to check more in the array. Instead of Boolean type array one can use Byte array, but will not cause much difference.
Then the question was on 'Default' 'Access Specifier'.
Next question was on Singleton Design pattern.

2nd Round -
Question 1 : You are given a 2 dimensional matrix of integers having both positive & negative integers. Now you have to find
                     the matrix where sum of all its numbers is minimum in all the possible matrices possible from given matrix.
Answer : I was not able to find the matrix but wrote the code to find the minimum sum of all number in the sub-matrix.
               Will try to post the code for this here.

Question 2 : Write the code to create the pool of threads i.e. custom code like of Executor in Java.
Answer : It was not possible to write the code, but I just gave a brief idea on it.
Powered by Create your own unique website with customizable templates.