Placement prep + AI for engineers
Evidence-led articles on aptitude, coding, company-specific test patterns, and AI roadmaps for Indian engineering students. 1019 articles published so far. India-context throughout.
Count Edges in an Undirected Graph: Algorithm and Code
Learn how to count edges in an undirected graph using the Handshaking Lemma. Step-by-step algorithm, Python and C++ code, and complexity analysis included.
Count Even and Odd Elements in an Array
Single-pass O(n) algorithm to count even and odd elements in an array. Working code in C, C++, Python, and Java, with complexity analysis and edge cases.
Count Vowels, Consonants, Digits and Special Characters in a String
Programs in Python, C, and Java to count vowels, consonants, digits, and special characters in a string. Algorithm, code, and traced outputs included.
Find All 0(1+)0 Patterns in a String: C & Python Guide
Count every 0(1+)0 occurrence in a binary string using a linear scan. C and Python code included, plus edge cases and O(n) complexity explained for placement rounds.
Lower Triangular Matrix Check: Programs in C, Java, Python
A square matrix is lower triangular when all entries above the main diagonal are zero. Programs in C, C++, Java, and Python with traced example and complexity analysis.
Check if a Matrix Is Upper Triangular: Code and Complexity
Verify whether a square matrix is upper triangular: the below-diagonal condition, verified C, Python, and Java code, and O(n²) complexity analysis for placement rounds.
Kth Smallest Element in an Unsorted Array: 4 C++ Approaches
Four C++ methods to find the Kth smallest element in an unsorted array: sort, QuickSelect, max-heap, and nth_element, with complexity trade-offs and placement tips.
Find Duplicate Elements in an Array: 5 Approaches
Five approaches to find duplicates in an array: O(n²) nested loops, sort-and-scan, hash set, XOR trick, and Floyd's cycle detection, with C, C++, and Python code.
ASCII Value of a Character: C, C++, Java, Python
Programs to find the ASCII value of a character in C, C++, Java, and Python. Key ASCII ranges, worked examples, and interview variants for placement tests.
The Handshakes Problem: Formula, Derivation, and Code
Derive the handshakes formula step by step, verify worked examples, and implement the solution in Python and C. A combinatorics guide for placement aptitude rounds.
Maximum Product Subarray: Algorithm, Code, and Dry Run
Find the maximum product subarray using the max-min tracking method. Algorithm steps, dry run table, Python and C code, complexity analysis, and placement context.
Maximum Scalar Product of Two Vectors: Algorithm and Code
Find the maximum scalar product of two vectors by sorting both arrays in the same order. Algorithm, complexity analysis, and verified C and Python code.
Find Min and Max in Each Row of a Matrix
C and Python programs to find minimum and maximum elements in each row of a matrix. Includes algorithm, complexity analysis, and placement test variations.
Program to Find Minimum Scalar Product of Two Vectors
Find the minimum dot product of two integer arrays by sorting one ascending and the other descending. Algorithm, proof, worked example, and C/C++/Java/Python code.
Days in a Given Month: Python, Java, C and C++ Programs
Python, Java, C, and C++ programs to find days in a given month and year. Covers the leap year rule, if-elif, array lookup, and standard library approaches.
Find the Quadrant of Given Coordinates: C Program and Explanation
Find the quadrant of any coordinate pair using a C program. Covers all four quadrants, origin, x-axis and y-axis cases, and O(1) complexity analysis.
Sum of All Numbers in a String: 4 Language Solutions
Step-by-step programs in Python, Java, C, and C++ to extract every number from a string and return their sum, with worked examples and complexity notes.
Sum of Array Elements: C, C++, Java, and Python
Find the sum of elements in a given array using loop-based programs and built-in functions in C, C++, Java, and Python, with examples and complexity analysis.
Sum of Perfect Square Elements in Array: C, C++, Java, Python
Find the sum of perfect square elements in an array in C, C++, Java, and Python. Algorithm, floating-point safety, traced example, and complexity analysis.
Sum of Boundary Elements of a Matrix: C, C++, Java, Python
Two complete approaches: O(N+M) optimised and O(N×M) check-each, to find the sum of boundary elements of a matrix, in C, C++, Java, and Python.
Program to Remove All Non-Alphabet Characters from a String
Step-by-step algorithm and verified C, C++, Java, and Python code to remove all non-alphabet characters from a string, with edge cases and O(n) complexity analysis.
Remove Duplicate Elements from an Array: Python, C++, Java
Remove array duplicates: two-pointer for sorted arrays (O(n), O(1) space); HashSet for unsorted (O(n), O(n) space). Code in Python, C++, and Java.
Program to Replace a Substring in a String
Manual algorithm plus working code in Python, Java, and C to replace every occurrence of a substring, with Wipro placement context and edge cases.
Find Nth Node from End of a Linked List: Two Approaches
Two methods to return the Nth node from the end of a linked list: the length-based two-pass approach and the single-pass two-pointer technique.
Reverse a Number in C, C++, Java and Python
Iterative and recursive approaches to reverse a number in C, C++, Java, and Python. Step-by-step trace, working code, and complexity analysis.
Reverse an Array: 4 Methods in C, Python, and Java
Four methods to reverse an array: print-from-end, auxiliary array, in-place swap, and recursion. Working code in C, Python, and Java with complexity analysis.
Swap Two Numbers Without a Third Variable
Three ways to swap two numbers without a third variable, with C code: arithmetic, XOR, and multiply-divide. Covers trade-offs, overflow risk, and what interviewers ask.
Pronoun-Antecedent Agreement: Sentence Correction Rules
Five pronoun-antecedent agreement error types tested in AMCAT, TCS NQT, and placement verbal sections. Rules, worked examples, and practice questions.
Function Prototype in C: Declaration, Syntax, and Why It Matters
A function prototype tells the C compiler the return type, argument count, and argument types before the function is defined. Learn what happens when you skip it.
Pyramid Pattern Programs Using Numbers: C, Python, Java
C, C++, Java, and Python code for seven number-pyramid variants, including Floyd's triangle and Pascal's triangle, with verified output for height 5.
Pyramid Star Patterns in C, C++, Java, and Python
Six pyramid star patterns with C, C++, Java, and Python code: right-angled, centered, inverted, hollow, and diamond. Loop logic and sample output for n=5.
Python Matrix Multiplication: Programs and Examples
Learn matrix multiplication in Python with nested loops and NumPy. Verified programs, step-by-step examples, and CRT placement test patterns for engineering students.
Python Nested Dictionaries with Example Programs
Create, access, modify, and iterate Python nested dictionaries with worked code examples. Covers .get() safety and patterns from placement coding rounds.
Types of Operators in Python: All 7 Types with Examples
Python has 7 operator types: arithmetic, comparison, logical, bitwise, assignment, identity, and membership. Learn each with code examples and placement tips.
Python print() Function: How to Print Output in Python
Complete guide to Python's print() function: syntax, sep, end, file, flush parameters, f-strings, and output formatting patterns for placement coding rounds.
Python: Remove a Character from a String (3 Methods)
Three Python methods to remove a character from a string: str.replace(), list comprehension with join(), and str.translate(). Code examples and edge cases included.
Python Program to Remove Duplicate Characters from a String
Three Python methods to remove duplicate characters from a string: simple loop, set-based O(n), and dict.fromkeys(). Covers verified outputs and time complexity.
Swap Two Variables in Python: All Four Methods
Four ways to swap two variables in Python: tuple unpacking, temp variable, arithmetic, and XOR, with code examples, derivations, and placement test context.
Python String Length: 5 Programs to Find Length of a String
Five methods to find string length in Python: len(), for loop, recursion, non-whitespace count, and Unicode code points vs grapheme clusters.
Rat in a Maze: Backtracking Algorithm with C++ Code
Solve the rat in a maze problem using backtracking in C++. Step-by-step algorithm, traced 4×4 example, and time and space complexity for placement interviews.
Reading Comprehension: Types of Questions in Aptitude Tests
Four question types appear in every placement RC passage: direct, inferential, vocabulary-in-context, and tone. Learn how to identify each and adjust your strategy.
Syllogism Part 2: Three-Premise Chains and Negative-Statement Traps
Builds on Venn basics with three-premise sorites chains, Celarent-Darii-Ferio named moods, Baroco, complementary pairs, and 10 verified worked examples.
Regular Expressions in Python: Complete Guide
Python's re module explained: metacharacters, special sequences, and pattern-matching methods. Includes worked examples for phone validation and email extraction.
Python Comparison Operators: All 6 With Examples
Python has six comparison operators that each return True or False. This guide covers ==, !=, >, <, >=, and <= with examples for numbers, strings, and chaining.
Remove All Non-Alphabet Characters from a String in Python
Three Python methods to strip digits, spaces, and symbols from a string, keeping only letters. Covers isalpha(), regex, and translate() with worked examples.
Remove Vowels from a String in Python: 4 Methods
Four Python methods to remove vowels from a string: for loop, list comprehension, filter(), and regex. With time complexity and placement coding round patterns.
Replace Array Elements with Their Rank: Two Approaches
Two approaches to replace each array element with its rank: O(n log n) HashMap and O(n²) brute force, with C++, Python, and Java code.
How to Return Multiple Values from a Function in C
C functions return one value by default. This guide covers four methods: pointers, structs, arrays, and malloc, with working code examples for placement test prep.
Get the AI Career Roadmap 2026 (free PDF)
2026 placement-drive AI patterns, project picks recruiters credit, and a prep timeline that fits beside aptitude and coding work.
Download the free PDF