BPSC Assistant Programmer Exam 19 July 2023 — Question Solution | বিপিএসসি (সরকারি কর্ম কমিশন) সহকারী প্রোগ্রামার নিয়োগ পরীক্ষা ২০২৩ — প্রশ্ন সমাধান
- BPSC
- Assistant Programmer
- 19 July 2023
- 8 questions · 0 MCQ, 8 written
Page updated
ARBS Academy · itjobs.arbsacademy.com
About this exam paper · প্রশ্নপত্র পরিচিতি
The BPSC Assistant Programmer exam was held on 19 July 2023. The paper had 8 written questions. The subjects asked most were Algorithms (2), Networking (2) and Data Structures (1). This page lists every question, with 1 answered and explained; the rest of the answers open with a free ARBS Academy account, where the paper can also be practised as a timed test.
বিপিএসসি (সরকারি কর্ম কমিশন) সহকারী প্রোগ্রামার নিয়োগ পরীক্ষার (২০২৩) এই প্রশ্নপত্রে ৮টি প্রশ্ন ছিল, বেশিরভাগ অ্যালগরিদম ও নেটওয়ার্কিং থেকে। এখানে ১টি প্রশ্নের ব্যাখ্যাসহ উত্তর দেওয়া আছে; বাকিগুলো ফ্রি অ্যাকাউন্টে খোলে।
- Organisation
- BPSC
- Post
- Assistant Programmer
- Exam date
- 19 July 2023
- Questions
- 8 (0 MCQ, 8 written)
- Exam guide
- BPSC non-cadre IT posts · পিএসসি নন-ক্যাডার আইটি পদ
(a) The complexity of merge sort is T(n) = 2T(n/2)+n. Explain how the above equation is derived?
(b) What are the tasks of linker and loader? Describe briefly using examples.
(a) List down the layers of the OSI model in top-down manner.
(b) Find out the default mask, network address and broadcast address of the classful IPv4 address: 172.16.99.45
(a) How do you define packet fragmentation? Explain briefly the transparent and non-transparent fragmentation with necessary diagram.
(b) Describe briefly the TCP/IP tunneling using appropriate diagram.
(a) How does a compiler handle comments in source code?
(b) What is the difference between sizeof c+1 and sizeof (c+1)?
(a) How does dynamic programming relate with divide and conquer approach?
(b) Does greedy algorithm always achieve optimal solution? If not, when does greedy approach achieve optimal solution?
Sign up free to see the model answers to written questions 1–5 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
(a) Compare array and linked list with necessary diagram.
(b) Draw a binary tree of 15 elements in (a) Preorder (b) In-order (c) Post order traversals.
Model answer
(a) Array vs linked list
An array stores its elements in one contiguous block of memory, so element i is at address base + i × (element size) and can be reached directly. A linked list stores each element in a separate node that holds the data and a pointer to the next node. The nodes can be anywhere in memory and are reached by following the pointers from head; the last node points to NULL.
Array of 4-byte integers starting at address 2000:
graph LR
a0["a[0] = 15 (2000)"] --- a1["a[1] = 42 (2004)"] --- a2["a[2] = 8 (2008)"] --- a3["a[3] = 23 (2012)"]
Linked list holding the same values (node addresses are scattered):
graph LR
hd["head"] --> n1["15 | next (node at 3120)"]
n1 --> n2["42 | next (node at 1408)"]
n2 --> n3["8 | next (node at 5260)"]
n3 --> n4["23 | NULL (node at 2236)"]
| Basis | Array | Linked list |
|---|---|---|
| Memory | One contiguous block | Separate nodes joined by pointers |
| Size | Fixed when declared (static array) | Grows and shrinks at run time |
| Access to the k-th element | O(1), by index | O(n), walk from head |
| Insert/delete at the beginning | O(n), elements must shift | O(1), change head |
| Insert/delete in the middle | O(n) shifting | O(1) relinking once the previous node is known (finding it is O(n)) |
| Extra memory | None per element | One pointer per node (two in a doubly linked list) |
| Unused space | Slots wasted if declared too large | No unused slots |
| Cache behaviour | Good (neighbours are adjacent) | Poor (nodes are scattered) |
| Binary search on sorted data | Possible, O(log n) | Not practical (no random access) |
Example: insert 30 between 42 and 8. In the array, 8 and 23 must each move one place right before 30 is written (n − k moves in general). In the linked list, create a node p for 30, set p->next = q->next and then q->next = p, where q is the node holding 42. That is two pointer changes and no shifting.
(b) A binary tree of 15 elements and its three traversals
Example used: a perfect binary search tree with 15 keys (4 levels, height 3 counted in edges).
graph TD
k40((40)) --> k20((20))
k40 --> k60((60))
k20 --> k10((10))
k20 --> k30((30))
k60 --> k50((50))
k60 --> k70((70))
k10 --> k5((5))
k10 --> k15((15))
k30 --> k25((25))
k30 --> k35((35))
k50 --> k45((45))
k50 --> k55((55))
k70 --> k65((65))
k70 --> k75((75))
The rules, applied recursively at every node:
- Preorder: Root → Left → Right
- Inorder: Left → Root → Right
- Postorder: Left → Right → Root
(a) Preorder: 40, 20, 10, 5, 15, 30, 25, 35, 60, 50, 45, 55, 70, 65, 75
(b) Inorder: 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75
(c) Postorder: 5, 15, 10, 25, 35, 30, 20, 45, 55, 50, 65, 75, 70, 60, 40
Checks: preorder starts with the root (40) and postorder ends with it; the inorder of a binary search tree comes out in ascending order.
If the tree is to be drawn with each node numbered in the order it is visited, write these numbers beside the nodes:
| Node | Preorder no. | Inorder no. | Postorder no. |
|---|---|---|---|
| 40 | 1 | 8 | 15 |
| 20 | 2 | 4 | 7 |
| 10 | 3 | 2 | 3 |
| 5 | 4 | 1 | 1 |
| 15 | 5 | 3 | 2 |
| 30 | 6 | 6 | 6 |
| 25 | 7 | 5 | 4 |
| 35 | 8 | 7 | 5 |
| 60 | 9 | 12 | 14 |
| 50 | 10 | 10 | 10 |
| 45 | 11 | 9 | 8 |
| 55 | 12 | 11 | 9 |
| 70 | 13 | 14 | 13 |
| 65 | 14 | 13 | 11 |
| 75 | 15 | 15 | 12 |
Exam tip: in (a) draw both diagrams and contrast O(1) indexed access with O(1) relinking; in (b) the root is first in preorder, 8th of 15 in the inorder of this tree, and last in postorder.
(a) What do you understand by Agile? Mention its four values.
(b) How do you define 2 factor authentication? Give example.
(a) Define Electronic Payment System (EPS) with necessary diagram. Name 5 types of EPS.
(b) Name and define five components of Data communication system with necessary diagram.
Sign up free to see the model answers to written questions 7–8 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Explanations © ARBS Academy
Keep going with a free account · ফ্রি অ্যাকাউন্টে যা যা করতে পারবেন
7 more answers from this paper open with a free account.
এই প্রশ্নপত্রের আরও ৭টি উত্তর, ধাপে ধাপে ব্যাখ্যাসহ, ফ্রি অ্যাকাউন্টে খুলবে।
Free account · 1 day of Premium free
Paper analysis · প্রশ্নপত্র বিশ্লেষণ
Its questions come from 7 syllabus chapters; OSI & TCP/IP Models, Protocols (TCP/UDP/HTTP/DNS) and Sorting lead, with 1 each. OSI & TCP/IP Models is asked in 112 other papers too (2012–2026).
Its biggest topics · প্রধান টপিক
Questions in this paper, and how many of our other papers ask the topic
- OSI & TCP/IP Models Networking · 112 other papers, 2012–20261
- Protocols (TCP/UDP/HTTP/DNS) Networking · 90 other papers, 2012–20261
- Sorting Algorithms · 59 other papers, 2013–20261
- Arrays & Linked Lists Data Structures · 38 other papers, 2017–20251
- Greedy & Divide and Conquer Algorithms · 19 other papers, 2016–20261
- Agile & Scrum Software Engineering · 10 other papers, 2017–20261
From our own past papers: each question filed under one syllabus chapter. Practice and held questions are not counted.
Questions about this paper · সাধারণ প্রশ্ন
- How many questions were in the BPSC Assistant Programmer exam (2023)?
- 8 written questions.
- Which subjects were asked most in the BPSC Assistant Programmer exam (2023)?
- Algorithms (2), Networking (2) and Data Structures (1), out of 8 questions.
- When was the BPSC Assistant Programmer exam held?
- On 19 July 2023.
- Where can I find the BPSC Assistant Programmer exam (2023) question solution?
- On this page: 1 of the 8 questions are shown with worked answers. The rest of the answers open with a free ARBS Academy account, where the paper can also be practised as a timed test.
Question text is from the public recruitment exam; answers and explanations are written by ARBS Academy. All past papers