0% found this document useful (0 votes)
92 views

Basic Elementary Exercise For C Programming Biggners

This document contains descriptions of 100 basic programming problems labeled BA-001 through BA-100. The problems cover a range of topics including arrays, strings, linked lists, binary operations, and other basic algorithms.

Uploaded by

Ayush jaiswal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views

Basic Elementary Exercise For C Programming Biggners

This document contains descriptions of 100 basic programming problems labeled BA-001 through BA-100. The problems cover a range of topics including arrays, strings, linked lists, binary operations, and other basic algorithms.

Uploaded by

Ayush jaiswal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Basic Programming

Problems
July 2019
infinilearn.org
BA-001 BA-002
Given a number N and a value K. From the right, set Given a node from singly linked list. Count the number
the Kth bit in the binary representation of N of nodes till the end

BA-003 BA-004
Given a node from doubly linked list. Count the total
Given two numbers M and N. Find the position of
number of nodes
rightmost different bit in binary representation of
numbers.

infinilearn.org
BA-005 BA-006
Take two numbers as user input and print their GCD Swap 2 values with and without using third variable

BA-007 BA-008
Create a diamond pattern for the given number of Remove a specific word from a sentence
stars
*
**
***
**
*

infinilearn.org
BA-009 BA-010
Encode a string with every number or alphabet Given a odd length string print from middle.
character shifting 4 sequence ahead. For ex. Example
J => N, b => f, y => c, 1 => 5, 9 => 3 Input: PAWAN
Sample input: All-convoYs-9-be:Alert1. Output: W WA WAN WANP WANPA
Sample Output: Epp-gsrzsCw-3-fi:Epivx5.

BA-011 BA-012

Given a number n the task is to complete the For a singly linked list return the last node whose
function which returns an integer denoting the index is divisible by a given number ‘k’
smallest number evenly divisible by each
For example if k is 2, and linked list has 9 elements,
number from 1 to n. you need to return the value of 8th node
Example: for n = 6, output will be 60, as 60 is
the smallest number that can be divided by all
numbers from 1 to 6

infinilearn.org
BA-013 BA-014
Third largest element
Replace all 0's with 5

BA-015 BA-016
Minimum distance between two numbers Rotate Array

infinilearn.org
BA-017 BA-018
Greater on right side Convert array into Zig-Zag fashion

BA-019 BA-020
Binary Array Sorting Number of occurrence

infinilearn.org
BA-021 BA-022
Maximum product of two numbers Find the Odd Occurrence

BA-023 BA-024
k largest elements Index of first 1 in a sorted array of 0’s and 1’s

infinilearn.org
BA-025 BA-026
Positive and negative elements Elements in the Range

BA-027 BA-028
Immediate Smaller Element Count possible triangles

infinilearn.org
BA-029 BA-030
Majority Element First and last occurrences of X

BA-031 BA-032
Pythagorean Triplet Find the smallest and second smallest element in
an array

infinilearn.org
BA-033 BA-034
Count triplets with sum smaller than X Missing number in array

BA-035 BA-036
Type of array Array of alternate +ve and -ve no.s

infinilearn.org
BA-037 BA-038
Professor and Parties Reverse array in groups

BA-039 BA-040
Shuffle integers Arranging the array

infinilearn.org
BA-041 BA-042
Find the fine Product of maximum in first array and minimum in
second

BA-043 BA-044
Form largest number from digits Reverse sub array

infinilearn.org
BA-045 BA-046
Implement stack using array Find triplets with zero sum

BA-047 BA-048
Twice counter Remove character

infinilearn.org
BA-049 BA-050
Sum of numbers in string Keypad typing

BA-051 BA-052
Uncommon characters Binary String

infinilearn.org
BA-053 BA-054
Check if string is rotated by two places Reverse each word in a given string

BA-055 BA-056
Consecutive elements Substrings with similar first and last characters

infinilearn.org
BA-057 BA-058
Merge two strings Find first repeated character

BA-059 BA-060
Extract Maximum Check if strings are rotations of each other or not

infinilearn.org
BA-061 BA-062
Check for subsequence URLify a given string

BA-063 BA-064
Shortest direction Boolean String Value

infinilearn.org
BA-065 BA-066
Amend The Sentence Permutations of a given string

BA-067 BA-068
Remove common characters and concatenate Wildcard string matching

infinilearn.org
BA-069 BA-070
Difficulty of sentence Encrypt the string - 1

BA-071 BA-072
Replace the Bit Sort in specific order

infinilearn.org
BA-073 BA-074
Check if two arrays are equal or not Minimum Distinct Ids

BA-075 BA-076
Set kth bit Swap two nibbles in a byte

infinilearn.org
BA-077 BA-078
Check whether K-th bit is set or not Set Bits

BA-079 BA-080
Bit Difference Count total set bits

infinilearn.org
BA-081 BA-082
Find position of set bit Power of 2

BA-083 BA-084
Generate Binary Numbers Angle between hour and minute hand

infinilearn.org
BA-085 BA-086
Three distinct factors Find number of days between two given dates

BA-087 BA-088
Print first n Fibonacci Numbers Thief trying to escape

infinilearn.org
BA-089 BA-090
Dice throw Base Conversion

BA-091 BA-092
Check if the door is open or closed Check if given four points form a square

infinilearn.org
BA-093 BA-094
Pair cube count Convert from any base to decimal

BA-095 BA-096
Check if the number is Fibonacci Pattern Jumping

infinilearn.org
BA-097 BA-098
Maximum money Repetitive Addition Of Digits

BA-099 BA-100
How Many X's? Max Sum Subarray of size K

infinilearn.org
BA-101 BA-102
Number of paths Find the element that appears once in sorted array

BA-103 BA-104
Searching an element in a sorted array Does array represent Heap

infinilearn.org
BA-105 BA-106
Tower of Hanoi Find the Highest number

BA-107 BA-108
Interesting Patterns Count the characters

infinilearn.org
BA-109 BA-110
Intersection of two arrays Most frequent word in an array of strings

BA-111 BA-112
Finger Game Shortest path from 1 to n

infinilearn.org
BA-113 BA-114
Ways To Tile A Floor Unique Numbers

BA-115 BA-116
Sum of dependencies in a graph Compute Nth Fibonacci number using recursion

infinilearn.org
BA-117 BA-118
How do you find the middle element of a linked list How do you reverse a singly linked list?
in a single pass?

BA-119 BA-120
Write a program to implement a binary search Print all leaf node of a binary tree?
algorithm?

infinilearn.org

You might also like