Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me with these questions! thank you!(in C language) 1. [10] Write a function ini search_substring(char texall, int tlen, char pattern (), int plen,

please help me with these questions! thank you!(in C language)

image text in transcribed

1. [10] Write a function ini search_substring(char texall, int tlen, char pattern (), int plen, int **index, int *ilen) to find if pattem exists in text, where text and pattern are two arrays and plen tlen. The function returns all the indices of j of text in array index/] if text/j...j+plen-1] - pattern[O...plen-1), ilen is initialized to 0. and the array index is dynarically allocated, please also write a function call example, 2.[10] Assume the node structure is as follows: struct node { int data; struct node *next; struct node *prev; please write a function struct node *merge(struct node *a. struct node "h) to merge two doubly linked lists contains integer numbers without duplicates in the increasing order. You have to remove duplicates. Also show how to call this function. 3. [15] Assume a sparse 2-D nxn matrice uses the following linked list data structure to save memory when n is large. Write a nor-recursive fur ction to : ultiply two 2-D nxn ratrices. struct node { int x, y: [800 11] int value; struct node "right, down; 0 1 0 0 00012 22 0 15 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

More Books

Students also viewed these Databases questions