UEMK-CS-2019 / DSA

Data-structure-Algorithm Hacker Rank | Problem + Solution 👽

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Data-structure & Algorithm

Problems | Solutions + video tutorial

.

GitHub repo size GitHub language count GitHub top language GitHub contributors GitHub last commit YouTube

C Array Data-structure

  1. The average of 10 numbers using Array
  2. You are given two matrices of dimensions N x N, filled with integers
  3. Calculate the sum of array elements by passing to a function
  4. count a total number of duplicate elements in the array using function
  5. Calculate sum of all elements of an array using pointers as arguments
  6. Add array element
  7. Delete elements from Array
  8. Display humidity
  9. Second Highest number in Array

.

C Array Data-structure

  1. Take an 1D array of size n. It contains names of students in a class. Print the names in separated lines
  2. Delete duplicate elements in Array
  3. Perform multiplication of two polynomial using arrays
  4. Perform right shift operation by n on an 1D array of size m. For example say, A[5] = {1,2,3,4,5}. If we are right shifting the elements by 3 then the output will be {4,5,1,2,3}
  5. A is a square matrix of dimension nxn. ‘n’ is user input. Calculate the value of the following equation A2+A+I
  6. Take a 2D array of size 2Xn. 1st row contains the roll numbers and 2nd row contains corresponding marks in exam. 'n' is the number of students here. Now sort the marks in ascending order along with the roll numbers and
  7. You have been given an array of n positive numbers. Now print the same array of n length but here every index will contain the sum of all the elements in the array except the element on that index. For example a[i] = a[0]+a[1]+….+a[i-1]+a[i+1]+…+a[n-1]
  8. Check whether a matrix of nXm size is sparse or not
  9. Transpose of a matrix

.

Python basics

  1. Python program to get the volume of a sphere with radius 6. Take pi=3.14
  2. even or odd
  3. area of a circle
  4. height of a triangle and compute the area
  5. subtract the smaller number from the larger number
  6. Take the name, age and address as user input
  7. Write a Python program to solve (x + y) * (x + y)
  8. convert seconds to day, hour, minutes and second
  9. Sort three integers using conditional statements

.

Python mid-level

  1. Take a number n as input and print the sum of all n natural numbers using for loop
  2. Take a number n as input and check whether it is palindrome or not
  3. Take a number n as user input. Find its square root
  4. Print the numbers that are divisible by both 3 and 7 in the range 1 to n. take n as user input
  5. Print the factorial of n. Take n as user input
  6. Armstrong or not
  7. prime or not
  8. print all factors

.

C Data-structure Pro

  1. You have set of numbers stores in a linked list. Take another number n as user input and insert the element in a position in the linked list. the position of insetion is also given by the user
  2. Take a linked list as user input. Copy all the unique elements from that linked list into another new linked list
  3. Add two given polynomil using linked list
  4. Multiply two given polynomial using linked list
  5. You have a set of numbers stored in a linked list. Find the sum of all numbers in even positions in a linked list
  6. You have a set of elements stored in a linked lsit. Delete all the odd numbers from the linked list
  7. You have two linked lists given. Merge them into a single list
  8. Sort the list using bubble sort

.

Python mid-level

  1. Write program to find the prime numbers in a range using function
  2. Take n as input and check which ones are Armstrong number using a function in the range 1 to n
  3. Write a function to calculate GCD of two numbers and then call the function to get GCD of 4 numbers
  4. Take a paragraph as input and then replace all the “the” word with “THE”
  5. Take a paragraph as input and then check whether a specific word is present in the paragraph or not. the word also should be user input
  6. Take a paragraph as input and then delete all the white spaces at the beginning and the end of the paragraph
  7. Take a sentence as input. Take two integer numbers as input. Print the substring starting and ending at the positions same as those numbers
  8. Given 2 strings, str1, and str2 return a new string made of the first, middle and last char of each of the input strings. characters from the 1st srting will be in lowercase and characters from the 2nd srting will be in uppercase

.

C mid-level Linked list

  1. insert an element in a specific position in doubly linked list
  2. Delete an element from a given position in doubly linked list
  3. Insert at the beginning and at the end of a doubly linked list
  4. Insert elements at the end and the beginning of a circular linked list
  5. delete an element from a given position in cicular linked list
  6. Given two sorted doubly linked lists. Merge them into a single one without creating any new node
  7. Reverse a circular linked list
  8. Given a circular linked list. Split it into two separate circular linked lists without creating new nodes. One will contain all the odd numbers. Another one will contain all the even numbers.

.

Python mid-level

  1. create a list having the name,age,salary and address of a person. enter name,age,salary and address as input.
  2. take a string as input. use negative slicing to print a substing
  3. given a list in python. delete the element of a given position
  4. given a list of elements. find the maximum and minimum of the list using library fucntion
  5. create a list of tuples.
  6. given a string. convert it into a tuple
  7. concatinate 3 given tuples
  8. given a tuple. find the sum of its elements
  9. given a tuple. print its element in between a range

.

About

Data-structure-Algorithm Hacker Rank | Problem + Solution 👽


Languages

Language:C 83.6%Language:Python 16.3%Language:JavaScript 0.1%