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

Arrays

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

Sum of all the overlapping elements

January 15, 2022November 26, 2020 by Sumit Jain

Given two arrays of integers. Write a program to find the sum of all the overlapping elements between two arrays. … Read more

Categories Arrays, Beginner Tags Beginner Leave a comment

Find the Number of Contiguous Parking Areas

January 15, 2022November 22, 2020 by Sumit Jain

Problem: Given a building with parking slots. If a spot is free then it is marked by 1 and if … Read more

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

Get specific row K in a Pascal Triangle

January 15, 2022November 12, 2020 by Sumit Jain

Given a row index K, write a program to print the Kth of Pascal triangle. Note: row index starts from … Read more

Categories Arrays, Intermediate Tags Intermediate Leave a comment

Override the compare function for Arrays.sort method – Java

January 15, 2022October 30, 2020 by Sumit Jain

Many times we have an array 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

What is a Pascal Triangle?

January 15, 2022October 29, 2020 by Sumit Jain

Given a number N, write a program to print the first N lines of the Pascal triangle. Pascal Triangle: Note: … Read more

Categories Arrays, Beginner Tags Beginner Leave a comment

Minimum number of adjacent swaps to sort the given array

September 16, 2020 by Sumit Jain

Given an array of integers, you are allowed to swap only adjacent elements in the array. write a program to … Read more

Categories Arrays, Expert Tags Expert Leave a comment

Check if the given playlist of programs is valid

September 11, 2020 by Sumit Jain

Problem Statement: Given a playlist that contains the list of intervals with the start time, end time and program id. … Read more

Categories Arrays, Beginner, Scheduling/Intervals Tags Beginner Leave a comment

Maximum meetings in one room

September 10, 2020 by Sumit Jain

You have one meeting room at your company. There are N meeting needs to take place. Every meeting has a … Read more

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

Find the number of pairs with even XOR

September 6, 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 Arrays, Beginner Tags Beginner Leave a comment

Given an array, Find the number of all pairs with even sum

September 1, 2020 by Sumit Jain

Objective: Given an array of integers, write a program to find the number of pairs with even sum. Example: Given … Read more

Categories Arrays Tags Beginner Leave a comment

The number of cycles in a given array of integers.

August 24, 2020 by Sumit Jain

Objective: Given an array of size N which contains integers from range 0 to N-1. (No duplicates). Write a program … Read more

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

Check if given sudoku is valid or not

August 21, 2020 by Sumit Jain

Problem: Given a filled sudoku, write a program to check if sudoku is valid or following all of its rules. … Read more

Categories Amazon Questions, Arrays, Intermediate, Software Development Engineer in Test, Software Engineer In Test Tags Intermediate Leave a comment
Post navigation
Older posts
Newer posts
← Previous Page1 Page2 Page3 … Page13 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