WZPGCL Assistant Engineer (CSE) — Exam: 27.05.2023প্রশ্ন ও সমাধান
- Set by
- WZPGCL
- Post
- Assistant Engineer
- Exam date
- 27 May 2023
- Questions
- 12 (0 MCQ, 12 written)
- Exam guide
- Government IT officer posts · সরকারি প্রতিষ্ঠানের আইটি পদ
- Data Structures · ডেটা স্ট্রাকচার 2
- Database · ডেটাবেজ 2
- Software Engineering · সফটওয়্যার ইঞ্জিনিয়ারিং 2
- Algorithms · অ্যালগরিদম 1
- Cloud & Emerging Tech · ক্লাউড ও উদীয়মান প্রযুক্তি 1
- Cyber Security · সাইবার নিরাপত্তা 1
- Networking · নেটওয়ার্কিং 1
- Operating Systems · অপারেটিং সিস্টেম 1
- Programming · প্রোগ্রামিং 1
Difference between IPv4 and IPv6.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Breifly Explain Asymmetric encryption.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Explain binary tree with example.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What is Pre-order and Post order?
Model answer
Direct answer: pre-order traversal visits Root → Left → Right; post-order traversal visits Left → Right → Root — they differ only in when the root is visited relative to its subtrees.
graph TD
A((A))-->B((B))
A-->C((C))
B-->D((D))
B-->E((E))
C-->F((F))
C-->G((G))
Pre-order (Root, Left, Right): visit the root first, then recursively traverse the left subtree, then the right subtree.
- Traversal order on the tree above: A → B → D → E → C → F → G
preorder(node):
if node is null: return
visit(node)
preorder(node.left)
preorder(node.right)
Post-order (Left, Right, Root): recursively traverse the left subtree, then the right subtree, and visit the root last.
- Traversal order on the tree above: D → E → B → F → G → C → A
postorder(node):
if node is null: return
postorder(node.left)
postorder(node.right)
visit(node)
Why the difference matters: pre-order is used to create a copy of a tree (root must be processed before its children can be attached), while post-order is used to safely delete a tree or evaluate an expression tree (children — operands — must be resolved before the parent — operator — is applied).
Exam takeaway: remember the mnemonic position of "Root" in the name — Pre-order puts Root first (before L, R); Post-order puts Root last (after L, R); both are O(n) time since every node is visited exactly once.
Difference between primary key, foreign key? What is trigger?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What is MVC? Write down the MVC design pattern.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Name of few architecture in design pattern.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What is Semaphore? How would you improve performance when using semaphores?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What is database Normalization? Write down the types of database Normalization.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What is constructor function? Write the properties of it.
Model answer
Definition. A constructor is a special member function that initializes an object at the moment it is created; it shares the class's name, has no return type (not even void), and runs automatically when the object is instantiated.
Key properties:
- Same name as the class — the compiler recognizes it as the initializer.
- No return type — distinguishes it from a regular method that happens to share the class name.
- Automatic invocation — called implicitly on object creation; never called like an ordinary method.
- Can be overloaded — multiple constructors with different parameter lists may coexist.
- Default constructor — if none is written, the compiler supplies a no-argument one that default-initializes members.
- Not inherited, though a subclass constructor can invoke a parent's via
super(...)/an initializer list.
Example (Java):
class Rectangle {
int width, height;
Rectangle() { width = 1; height = 1; } // default constructor
Rectangle(int w, int h) { width = w; height = h; } // parameterized (overloaded)
int area() { return width * height; }
}
Rectangle r1 = new Rectangle(); // width=1, height=1
Rectangle r2 = new Rectangle(4, 5); // width=4, height=5
Exam takeaway: a constructor's job is guaranteed initialization — same name, no return type, auto-invoked, overloadable — exactly what distinguishes it from every other member function.
Write down the difference between Divide and Conquer and Dynamic Programming.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Write about Blockchain.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Question text is from the public recruitment exam; answers and explanations are written by ARBS Academy. All past papers · Government IT officer posts guide