Job preparationCoding

Coding interview questions and practice problems

13 questions · 8 min read

The hands-on problems boards actually set — arrays, strings, matrices — each with a worked example to try yourself.

The words "coding round" make most people sweat. Remember what the board is actually after: not flawless code, but whether you can break a problem apart.

The problems below are the ones that come up most often in interviews here. Each has a small example — work it on paper or a whiteboard, because that is exactly how you will have to write it in the room.

The problems

আপনি একটি নির্দিষ্ট প্রোগ্রামিং ভাষায় একটি বেসিক সমস্যা সমাধান কিভাবে করবেন? (How do you solve a basic problem in a particular programming language?)

Try thisএকটি প্রোগ্রাম লিখুন যা একটি অ্যারের সর্বনিম্ন মান খুঁজে পাবে। (Write a program that will find the minimum value of an array.)

আপনি একটি নির্দিষ্ট প্রোগ্রামিং ভাষায় একটি বেসিক সমস্যা সমাধান কিভাবে করবেন? (How do you solve a basic problem in a particular programming language?)

Try thisএকটি প্রোগ্রাম লিখুন যা একটি অ্যারের সর্বাধিক মান খুঁজে পাবে। (Write a program that will find the maximum value of an array.)

আপনি একটি নির্দিষ্ট প্রোগ্রামিং ভাষায় একটি বেসিক সমস্যা সমাধান কিভাবে করবেন? (How do you solve a basic problem in a particular programming language?)

Try thisএকটি স্ট্রিং প্যালিনড্রোম কিনা তা নির্ধারণের জন্য একটি ফাংশন লিখুন।(Write a function to determine whether a string is a palindrome.)

ফিবোনাচ্চি সিরিজ (Fibonacci series): ফিবোনাচ্চি সিরিজের প্রথম nটি সংখ্যা প্রিন্ট করুন। (Print the first n numbers of the Fibonacci series.)

Try thisফিবোনাচ্চি সিরিজে প্রথম ১০টি সংখ্যা প্রিন্ট করুন। (Print the first 10 numbers in the Fibonacci series.)

ফ্যাক্টোরিয়াল ক্যালকুলেশন (Factorial calculation): একটি পূর্ণসংখ্যার ফ্যাক্টোরিয়াল হিসাব করুন। (Calculate the factorial of an integer.)

Try this৫ এর ফ্যাক্টোরিয়াল কী হবে? (What will be the factorial of 5?)

রিভার্স স্ট্রিং (Reverse String): একটি স্ট্রিং উল্টে দিন। (Reverse a string.)

Try thisস্ট্রিং 'hello' কে 'olleh' তে রূপান্তর করুন। (Problem: Convert string 'hello' to 'olleh'.)

প্রাইম নাম্বার চেক (Prime Number Check): একটি সংখ্যা প্রাইম কিনা তা পরীক্ষা করুন। (Check if a number is prime.)

Try this২৯ প্রাইম সংখ্যা কিনা তা যাচাই করুন। (Check whether 29 is a prime number.)

মার্জ এবং সোর্ট (Merge and Sort): দুইটি সর্ট করা অ্যারে মার্জ করুন এবং ফলস্বরূপ একটি সর্ট করা অ্যারে প্রাপ্ত করুন। (Merge two sorted arrays and get a sorted array as a result.)

Try thisঅ্যারে [1, 3, 5] এবং [2, 4, 6] মার্জ করে [1, 2, 3, 4, 5, 6] তৈরি করুন। (Merge the arrays [1, 3, 5] and [2, 4, 6] to form [1, 2, 3, 4, 5, 6])

নম্বরের ফ্রিকোয়েন্সি (Number Frequency): একটি অ্যারেতে প্রতিটি নম্বরের ফ্রিকোয়েন্সি গণনা করুন। (Calculate the frequency of each number in an array.)

Try thisঅ্যারে [1, 2, 2, 3, 3, 3] এর মধ্যে প্রতিটি নম্বরের ফ্রিকোয়েন্সি গণনা করুন। (Calculate the frequency of each number in the array [1, 2, 2, 3, 3, 3].)

ডুপ্লিকেট চেক (Duplicate Check): একটি অ্যারেতে ডুপ্লিকেট উপাদান রয়েছে কিনা তা পরীক্ষা করুন। (Check if an array contains duplicate elements.)

Try thisঅ্যারে [1, 2, 3, 4, 5, 1] এ ডুপ্লিকেট আছে কিনা তা যাচাই করুন। (Check for duplicates in array [1, 2, 3, 4, 5, 1].)

একটি স্ট্রিংকে নির্দিষ্ট দৈর্ঘ্যের ফর্ম্যাটে রূপান্তর করুন। (Convert a string to a specified length format.)

Try thisস্ট্রিং 'example' কে দৈর্ঘ্য 8 তে পূর্ণ করুন এবং 'example' এর পরে স্পেস যোগ করুন। (Fill in the string 'example' to length 8 and add a space after 'example'.)

ম্যাট্রিক্স রোটেশন: একটি 2D ম্যাট্রিক্স 90 ডিগ্রি ঘোরান। (Matrix Rotation: Rotate a 2D matrix by 90 degrees.)

Try thisম্যাট্রিক্স [[1, 2], [3, 4]] কে 90 ডিগ্রি ঘোরান। (Rotate the matrix [[1, 2], [3, 4]] by 90 degrees.)

দ্বিমাত্রিক সরণ: একটি ম্যাট্রিক্সের কোন এক সারি বা কলামকে নির্দিষ্ট সংখ্যা দ্বারা সরান। (Two-Dimensional Shift: Shift a row or column of a matrix by a specified number.)

Try thisম্যাট্রিক্সের প্রথম সারি দুইটি স্থান বামে সরান। (Move the first row of the matrix two places to the left.)

Tips for this round

  • Say what you are about to do out loud before you write it — code in silence and the board cannot see you think.
  • If you get stuck, say where. That is not a weakness; boards will often help you from there.

Want to learn this hands-on? Take a look at the related course.

Browse courses