Тёмный

Travel bag unboxing | impulse travel bag 75l | travel best bag under 1200 

Подписаться
Просмотров 145
% 2

impulse travel bag for men tourist backpack for hiking trekking camping rucksack 75l blue
Impulse travel backpack for men
impulse travel best backpack
impulse travel best bag
travel bag for 1000
tourist travel best bag under 2000
tourist travel backpack rucksack
tourist traveling best backpack under 1500
best travel backpack
travel bag for trekking
best travel bag unboxing
travel bag trekking hiking
tourist travel best bag for hiking
tourist travel best bag for trekking
company travel best bag
tourist best choice travel backpack
travelers best choice travel backpack
travelers best bag for trekking
travel trekking hiking backpack
travel trekking hiking backpack for cheap rate
tourist travel backpack for all time

Опубликовано:

 

22 окт 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 12   
@Tech_Nags
@Tech_Nags 2 месяца назад
Experiment 2: Students in a department need to be selected for a high jump competition based on their height (integer values only). Sort the heights of students using Quick sort and find the time required for the Sorting. import random import time def gen_data(a,n): for i in range(n): x=random.randint(0,100) a.append(x) def partition(a,left,right): key=a[left] i=left+1 j=right while True: while a[i]left: j=j-1 if i
@Tech_Nags
@Tech_Nags 2 месяца назад
Experiment 4: Sort a given set of elements using the Heap sort method. import random def gen_data(a,n): for i in range(n): a.append(random.randint(0,100)) def heapify(arr, n, i): largest = i l = 2 * i + 1 r = 2 * i + 2 if l < n and arr[i] < arr[l]: largest = l if r < n and arr[largest] < arr[r]: largest = r if largest != i: arr[i],arr[largest] = arr[largest],arr[i] heapify(arr, n, largest) def heapSort(arr): n = len(arr) for i in range(n // 2 - 1, -1, -1): heapify(arr, n, i) for i in range(n-1, 0, -1): arr[i], arr[0] = arr[0], arr[i] heapify(arr, i, 0) # Driver code to test above a=[ ] n=int(input('Enter size :')) gen_data(a,n) print('Given elements are:') print (a) heapSort(a) n = len(a) print ("Sorted array is") print (a)
@Tech_Nags
@Tech_Nags 2 месяца назад
Experiment 1: Employees in an organization need to be grouped for a tournament based on their ages. Sort the ages using Merge sort and find the time required to perform the sorting. import random def gen_data(a, n): for i in range(n): x=random.randint(0,100) a.append(x) def merge_sort(a,low,high): if high-low
@Tech_Nags
@Tech_Nags 2 месяца назад
Experiment 5: Implement Horspool algorithm for String Matching. def horspool(text,pattern): m=len(text) n=len(pattern) if m
@Tech_Nags
@Tech_Nags 2 месяца назад
Experiment 6: Consider n cities. The shortest path between every pair of cities needs to be determined. Implement Floyd’s algorithm for the All-Pairs- Shortest- Paths problem. Also find transitive closure by implementing Warshall’s algorithm. def all_pair_sort(dist,n): for k in range(n): for i in range(n): for j in range(n): dist[i][j]=min(dist[i][j], (dist[i][k]+dist[k][j])) def transit_clos(reach,n): for k in range(n): for i in range(n): for j in range(n): reach[i][j]=(reach[i][j])or (reach[i][k]and reach[k][j]) # driver code #input for floyd's algorithm graph=[[0,100,3,100],[2,0,100,100],[100,7,0,1],[6,10 0,100,0]] n=4 all_pair_sort(graph,n) print("All-Pairs- Shortest-Paths") for i in range(n): print (graph[i]) #input for warshall's algorithm #graph=[[0,1,0,0],[0,0,0,1],[0,0,0,0],[1,0,1,0]] graph=[[1,1,0,1],[0,1,1,0],[0,0,1,1],[0,0,0,1]] n=4 transit_clos(graph,n) print(" transitive closure") for i in range(n): print (graph[i])
@Tech_Nags
@Tech_Nags 2 месяца назад
Experiment 7: There are n different routes from hostel to college. Each route incurs some cost. Find the minimum cost route to reach the college from hostel using Prim’s algorithm. def min_edge(edge,v,vt): min=999 for i in range(len(edge)): x=edge[i][0] y=edge[i][1] w=edge[i][2] if(x in v and y in vt)or(x in vt and y in v): if w
@Tech_Nags
@Tech_Nags 2 месяца назад
Experiment 11: Consider the problem having weights and profits are: Weights: {3, 4, 6, 5} Profits: {2, 3, 1, 4} The weight of the knapsack is 8 kg. Find the optimal set of items to include in the knapsack using dynamic programming def knapsack(w,wt,val,n): k=[[0 for x in range(w+1)]for x in range(n+1)] for i in range(n+1): for w in range(w+1): if i==0 or w==0: k[i][w]=0 elif wt[i-1]
@Tech_Nags
@Tech_Nags 2 месяца назад
Experiment 9: Consider the distance between Hassan and N different cities. Every city can be reached from Hassan directly or by using intermediate cities whichever costs less. Find the shortest distance from Hassan to other cities using Dijkstra’s algorithm. def near_vertex(d,vt): min=999 for i in range(len(d)): if i not in vt: if d[i]
@Tech_Nags
@Tech_Nags 2 месяца назад
Experiment 8: Find Minimum Cost Spanning Tree of a given undirected graph using Kruskal’s algorithm. def find_set(all_set,key): for i in range(len(all_set)): if key in all_set[i]: return i def kruskal(edge,v): edge.sort(key=lambda x:x[2]) all_set=[ ] for k in vert: a=[] a.append(k) all_set.append(a) st_edge=[] i=0 ct=0 while ct
@Tech_Nags
@Tech_Nags 2 месяца назад
Experiment 3: Print all the nodes reachable from a given starting node in a graph using DFS and BFS def dfs(graph,node,path): path.append(node) for v in graph[node]: if v not in path: dfs(graph,v,path) def bfs(graph,start,path): q=[start] path.append(start) while q: node=q.pop(0) for v in graph[node]: if not v in path: path.append(v) q.append(v) #-------driver code--------- #//first write the example graph and then take input to the program from the same graph. graph={'A':['B','C'],'B':['C'],'C':['D','E'],'D':['E'],'E':['A']} #graph={'A':['B','C'],'B':['E','G'],'C':['F'],'D':['A','B','C','E'], 'E':['F','D'],'F':[],'G':['E','F']} #graph={1:[2,3,4],2:[6,3,1],3:[1,2,6,5,4],4:[1,3,5],5:[3,4],6:[2,3]} #graph={40:[20,10],20:[10,30,50,60],50:[70],70:[10],10:[30],30:[60], 60:[70]} #graph={1:[2,3],2:[1],3:[1],4:[5],5:[4],6:[]} path=[] dfs(graph,'A',path) print (“dfs sequence:”,path) path=[ ] bfs(graph,'A',path) print(“bfs sequence:”, path)
@Tech_Nags
@Tech_Nags 2 месяца назад
Experiment 12: Implement N Queens problem using Back Tracking. from math import * x={ } n=4 def place(k,i): if(i in x.values()): return False j=1 while j
@Tech_Nags
@Tech_Nags 2 месяца назад
Experiment 10: Consider a scenario where you need send a secret message across a network. To ensure the confidentiality of the message, encode it using Huffman coding and transmit the encoded message. string = 'BCAADDDCCACACAC' # Creating tree nodes class NodeTree(object): def __init__(self, left=None, right=None): self.left = left self.right = right def children(self): return (self.left, self.right) def nodes(self): return (self.left, self.right) def __str__(self): return '%s_%s' % (self.left, self.right) # Main function implementing huffman coding def huffman_code_tree(node, left=True, binString=''): if type(node) is str: return {node: binString} (l, r) = node.children() d = dict() d.update(huffman_code_tree(l, True, binString + '0')) d.update(huffman_code_tree(r, False, binString + '1')) return d # Calculating frequency freq = {} for c in string: if c in freq: freq[c] += 1 else: freq[c] = 1 freq = sorted(freq.items(), key=lambda x: x[1], reverse=True) nodes = freq while len(nodes) > 1: (key1, c1) = nodes[-1] (key2, c2) = nodes[-2] nodes = nodes[:-2] node = NodeTree(key1, key2) nodes.append((node, c1 + c2)) nodes = sorted(nodes, key=lambda x: x[1], reverse=True) huffmanCode = huffman_code_tree(nodes[0][0]) print(' Char | Huffman code ') print('----------------------') for (char, frequency) in freq: print(' %-4r |%12s' % (char, huffmanCode[char]))