C Program Count 1’s in a sorted binary array – Searching and Sorting – A simple solution is to linearly traverse the array. The time complexity of the simple solution is O(n). We can use Binary Search to find count in O(Logn) time.
c programming
C Programming-Merge Sort for Doubly Linked List – Searching and Sorting – Merge sort for singly linked list is already discussed. The important change here is to modify the previous pointers also when merging two lists
C Programming-Searching for Patterns Set 1 Naive Pattern Searching – Searching and Sorting – Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[].
C Programming – Longest Common Subsequence – Dynamic Programming – LCS problem has optimal substructure property as main problem can be solved using solution.
C programming – Given a sorted array and a number x, find the pair in array whose sum is closest to x – Searching and sorting.- Given a sorted array. find a pair in array whose sum is closest to x.
C Programming – Longest Increasing Subsequence – Dynamic Programming – The LIS problem is to find the length of the longest subsequence of a given sequence.
C programming K’th Smallest/Largest Element in Unsorted Array | Set 2 (Expected Linear Time) – Searching and Sorting – Given an array and a number k where k is smaller than size of array, we need to find the k’th smallest element in the given array. It is given that ll array elements are distinct.
C program to move a car – c programming – Speed of car can be adjusted by delay function,the delay lesser will be speed or less the delay car will move fast
functions of graphics.h in c – c programming – Every function is discussed with the arguments it needs, possible errors while using that function.
C program to draw a 3d bar chart – c programming – This c program draws a 3d bar chart and the source code is provided for the use