Skip to content
Algorithms
  • Home
  • IDE
  • Difficulty Level
    • Beginner
    • Intermediate
    • Expert
  • Interviews
    • Amazon Questions
    • Goldman Sachs
    • Google Interview
    • Microsoft Interview
    • Apache
    • NetApp
    • Adobe
    • Facebook
    • NVIDIA
    • Oracle
  • Login
  • Register

Maximum Surpasser in the given array

January 9, 2022December 18, 2020 by Sumit Jain

The “surpasser” of an element in an array is defined as the number of elements that are to the “right” … Read more

Categories Arrays, Divide and Conquer, Expert, Google Interview, Software Development Engineer (SDE), Software Engineer Tags Expert Leave a comment

Find the number of pairs with odd XOR

January 9, 2022December 17, 2020 by Sumit Jain

Given an array of integers, write a program to find the number of pairs for which the XOR is an … Read more

Categories Beginner, Bit Manipulation, Maths, Software Development Engineer (SDE), Software Development Engineer in Test, Software Engineer, Software Engineer In Test, Test Enginner Tags Beginner Leave a comment

Maximum CPU Load Problem in a jobs list

January 9, 2022December 14, 2020 by Sumit Jain

Given a list of n Jobs with start time, end time and CPU load when it is active at any … Read more

Categories Activity Selection, Google Interview, Intermediate, Scheduling/Intervals, Software Development Engineer (SDE), Software Engineer Tags Intermediate Leave a comment

Add digits until the number becomes a single digit

December 12, 2020 by Sumit Jain

Write a program to add the digits of the given number until the number becomes a single digit number. Example: … Read more

Categories Beginner, Numbers Tags Beginner Leave a comment

Check If Student is eligible for an Attendance Reward

January 9, 2022December 12, 2020 by Sumit Jain

In school a student gets rewarded if he has an attendance record without being absent for more than once or … Read more

Categories Google Interview, Software Development Engineer (SDE), Software Engineer, Strings Tags Beginner Leave a comment

Maximum overlaps in a given list of time intervals

January 15, 2022December 11, 2020 by Sumit Jain

Interval is defined as [start, end]- the start of the interval to the end of the interval. Given the list … Read more

Categories Activity Selection, Amazon Questions, Google Interview, Scheduling/Intervals Tags Intermediate Leave a comment

Remove Duplicates in a given Sorted Array

January 15, 2022December 9, 2020 by Sumit Jain

Given a sorted array of integers, write a program to remove duplicates in-place by modifying the given array such that … Read more

Categories Amazon Questions, Arrays, Beginner, Software Development Engineer (SDE), Software Engineer Tags Beginner Leave a comment

Random character in a given string – Java

January 15, 2022December 6, 2020 by Sumit Jain

Given a string, write a function that returns a random character from the string.  Example: Given string = algorithms @ … Read more

Categories Beginner, Strings Tags Beginner Leave a comment

Replace Elements with Greatest Element on Right

December 5, 2020 by Sumit Jain

Given an array of numbers nums[], write ment a function to replace each element of the array with the greatest … Read more

Categories Amazon Questions, Arrays, Beginner, Career Cup, Leet Code, Software Development Engineer (SDE), Software Engineer Tags Beginner Leave a comment

Count number of pairs in an array with sum = K

January 15, 2022December 4, 2020 by Sumit Jain

Given an array of integers and number K, write a program to find the number of pairs which has sum … Read more

Categories Amazon Questions, Arrays, Intermediate, Software Development Engineer (SDE), Software Development Engineer in Test, Software Engineer, Software Engineer In Test Tags Intermediate Leave a comment

Count similar words in a given array

December 4, 2020 by Sumit Jain

Given an array of strings, write a program to count all the similar words.  Similar words: Two words are similar … Read more

Categories Arrays, Beginner, Hulu, Software Development Engineer in Test, Software Engineer In Test Tags Beginner Leave a comment

Maximum distance from the nearest person.

December 3, 2020 by Sumit Jain

Given a bench with n seats and few people sitting, You are going to sit on a vacant seat such … Read more

Categories Arrays, Google Interview, Intermediate, Software Development Engineer (SDE), Software Engineer Tags Intermediate Leave a comment

Sort 0, 1, 2 in an array – Part 2

January 15, 2022November 29, 2020 by Sumit Jain

Given an array of numbers, that consists only of three types of integers, which are 0, 1, and 2. Write … Read more

Categories Arrays, Beginner, Software Development Engineer (SDE), Software Engineer Tags Beginner Leave a comment

Sort 0, 1, 2 in an array – Part 1

January 15, 2022November 29, 2020 by Sumit Jain

Given an array of numbers that consists only of three types of integers, which are 0, 1 and 2. Write … Read more

Categories Arrays, Beginner Tags Beginner Leave a comment

Override the compare function for Collections.sort method

January 15, 2022November 28, 2020 by Sumit Jain

Many times we have a list of custom objects and we need to sort these objects. In such cases we … Read more

Categories Arrays, Beginner, Java Concepts Tags Beginner Leave a comment
Post navigation
Older posts
Newer posts
← Previous Page1 Page2 Page3 … Page37 Next →






Subscribe ( No Spam!!)

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Recent Posts

  • Find an extra element in two almost similar arrays
  • find the Arithmetic Progression sequence
  • Find the Nth-term in a given arithmetic progression
  • Find The Minimum time difference
  • Departure and Destination Cities in a given itinerary
  • Given an array, rank its elements
  • Find Three Consecutive Odd Numbers in an array
  • Convert to Non-decreasing Array with one change
  • In an array, Duplicate the zeroes without expanding it
  • Maximum Depth of Valid Nested Parentheses in an arithmetic expression






© 2022 Algorithms • Built with GeneratePress